@mjhls/mjh-framework 1.0.695 → 1.0.696-1034-2

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.
@@ -35,6 +35,7 @@ var util = require('./util-f2c1b65b.js');
35
35
  var brightcoveReactPlayerLoader_es = require('./brightcove-react-player-loader.es-156bd4d6.js');
36
36
  var Pagination = _interopDefault(require('react-bootstrap/Pagination'));
37
37
  var Head = _interopDefault(require('next/head'));
38
+ var Figure$1 = _interopDefault(require('react-bootstrap/Figure'));
38
39
 
39
40
  var urlFor = function urlFor(source, builder) {
40
41
  return builder.image(source).auto('format');
@@ -7068,6 +7069,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
7068
7069
  var today = moment.moment().utc().format();
7069
7070
 
7070
7071
  var Videos = nodes.videos.filter(function (video) {
7072
+ console.dir(video);
7071
7073
  if ((video.is_visible === true || !video.hasOwnProperty('is_visible')) && (today >= video.published || !video.hasOwnProperty('published'))) {
7072
7074
  return video;
7073
7075
  }
@@ -8051,12 +8053,65 @@ var ArticleSeries = function ArticleSeries(_ref) {
8051
8053
  var articleContainerRef = React.useRef(null);
8052
8054
  var arrowRef = React.useRef(null);
8053
8055
 
8054
- var _useState = React.useState(0),
8056
+ var _ref2 = router && router.asPath && router.asPath.split('?')[1] ? React.useState(router.asPath.split('=')[1]) : React.useState(null),
8057
+ _ref3 = slicedToArray._slicedToArray(_ref2, 2),
8058
+ selectedArticle = _ref3[0],
8059
+ setSelectedArticle = _ref3[1];
8060
+
8061
+ var _useState = React.useState(false),
8055
8062
  _useState2 = slicedToArray._slicedToArray(_useState, 2),
8056
- contentWidth = _useState2[0],
8057
- setContentWidth = _useState2[1];
8063
+ firstLoad = _useState2[0],
8064
+ setFirstLoad = _useState2[1];
8065
+
8066
+ var _useState3 = React.useState(null),
8067
+ _useState4 = slicedToArray._slicedToArray(_useState3, 2),
8068
+ currentURL = _useState4[0],
8069
+ setCurrentURL = _useState4[1];
8070
+
8071
+ var _useState5 = React.useState(null),
8072
+ _useState6 = slicedToArray._slicedToArray(_useState5, 2),
8073
+ currentTitle = _useState6[0],
8074
+ setCurrentTitle = _useState6[1];
8075
+
8076
+ var _useState7 = React.useState(null),
8077
+ _useState8 = slicedToArray._slicedToArray(_useState7, 2),
8078
+ currentSummary = _useState8[0],
8079
+ setCurrentSummary = _useState8[1];
8080
+
8081
+ var _useState9 = React.useState(null),
8082
+ _useState10 = slicedToArray._slicedToArray(_useState9, 2),
8083
+ currentThumbnail = _useState10[0],
8084
+ setCurrentThumbnail = _useState10[1];
8085
+
8086
+ var _useState11 = React.useState(null),
8087
+ _useState12 = slicedToArray._slicedToArray(_useState11, 2),
8088
+ sensorVisible = _useState12[0],
8089
+ setSensorVisible = _useState12[1];
8090
+
8091
+ var _useState13 = React.useState(0),
8092
+ _useState14 = slicedToArray._slicedToArray(_useState13, 2),
8093
+ contentWidth = _useState14[0],
8094
+ setContentWidth = _useState14[1];
8058
8095
 
8059
- var upArrowClicked = false;
8096
+ var _useState15 = React.useState(false),
8097
+ _useState16 = slicedToArray._slicedToArray(_useState15, 2),
8098
+ upArrowClicked = _useState16[0],
8099
+ setUpArrowClicked = _useState16[1];
8100
+
8101
+ var _useState17 = React.useState(null),
8102
+ _useState18 = slicedToArray._slicedToArray(_useState17, 2),
8103
+ articleScrollHeight = _useState18[0],
8104
+ setArticleScrollHeight = _useState18[1];
8105
+
8106
+ var _useState19 = React.useState(false),
8107
+ _useState20 = slicedToArray._slicedToArray(_useState19, 2),
8108
+ articleClicked = _useState20[0],
8109
+ setArticleClicked = _useState20[1];
8110
+
8111
+ var _useState21 = React.useState(null),
8112
+ _useState22 = slicedToArray._slicedToArray(_useState21, 2),
8113
+ articleIndex = _useState22[0],
8114
+ setArticleIndex = _useState22[1];
8060
8115
 
8061
8116
  var Articles = nodes.articles.filter(function (article) {
8062
8117
  if ((article.is_visible === true || !article.hasOwnProperty('is_visible')) && today >= article.published) {
@@ -8089,7 +8144,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8089
8144
  'a',
8090
8145
  { onClick: function onClick(e) {
8091
8146
  return articleCardClickHandler(e);
8092
- }, 'data-articleid': '' + article.param.current },
8147
+ }, 'data-cardlabel': '' + articleLabel, 'data-articleIndex': '' + index, 'data-articleid': '' + article.param.current },
8093
8148
  React__default.createElement(
8094
8149
  'div',
8095
8150
  { className: 'prevNext-thumbnail' },
@@ -8119,43 +8174,17 @@ var ArticleSeries = function ArticleSeries(_ref) {
8119
8174
  });
8120
8175
  };
8121
8176
 
8122
- var _ref2 = router && router.asPath && router.asPath.split('?')[1] ? React.useState(router.asPath.split('=')[1]) : React.useState(null),
8123
- _ref3 = slicedToArray._slicedToArray(_ref2, 2),
8124
- selectedArticle = _ref3[0],
8125
- setSelectedArticle = _ref3[1];
8126
-
8127
- var _useState3 = React.useState(false),
8128
- _useState4 = slicedToArray._slicedToArray(_useState3, 2),
8129
- firstLoad = _useState4[0],
8130
- setFirstLoad = _useState4[1];
8131
-
8132
- var _useState5 = React.useState(null),
8133
- _useState6 = slicedToArray._slicedToArray(_useState5, 2),
8134
- currentURL = _useState6[0],
8135
- setCurrentURL = _useState6[1];
8136
-
8137
- var _useState7 = React.useState(null),
8138
- _useState8 = slicedToArray._slicedToArray(_useState7, 2),
8139
- currentTitle = _useState8[0],
8140
- setCurrentTitle = _useState8[1];
8141
-
8142
- var _useState9 = React.useState(null),
8143
- _useState10 = slicedToArray._slicedToArray(_useState9, 2),
8144
- currentSummary = _useState10[0],
8145
- setCurrentSummary = _useState10[1];
8146
-
8147
- var _useState11 = React.useState(null),
8148
- _useState12 = slicedToArray._slicedToArray(_useState11, 2),
8149
- currentThumbnail = _useState12[0],
8150
- setCurrentThumbnail = _useState12[1];
8151
-
8152
8177
  var articleCardClickHandler = function articleCardClickHandler(e) {
8153
8178
  e.preventDefault();
8154
8179
  var articleClicked = e.currentTarget.dataset.articleid;
8180
+ setArticleClicked(true);
8181
+ setArticleIndex(e.currentTarget.dataset.articleindex);
8182
+ setSensorVisible(false);
8155
8183
  setSelectedArticle(articleClicked);
8156
- scrollToArticle(articleClicked);
8184
+ scrollToArticle(articleClicked, e.currentTarget.dataset.cardlabel);
8185
+ arrowRef.current.style.visibility = 'hidden';
8157
8186
  };
8158
- var scrollToArticle = function scrollToArticle(id) {
8187
+ var scrollToArticle = function scrollToArticle(id, cardLabel) {
8159
8188
  var localArticleID = id ? id : selectedArticle;
8160
8189
  var findArticle = function findArticle(ref) {
8161
8190
  if (ref) {
@@ -8163,13 +8192,18 @@ var ArticleSeries = function ArticleSeries(_ref) {
8163
8192
  }
8164
8193
  return false;
8165
8194
  };
8195
+ console.log('cardLabel', cardLabel);
8196
+ var isNextPrev = cardLabel === 'Next' || 'Previous' ? true : false;
8197
+ console.log(isNextPrev);
8166
8198
  var indexOfRef = refArray.current.findIndex(findArticle);
8167
-
8168
8199
  if (indexOfRef >= 0) {
8169
8200
  var newOffsetTop = !firstLoad ? refArray.current[indexOfRef].wraperRef.current.offsetTop : refArray.current[indexOfRef].wraperRef.current.offsetTop + document.getElementsByTagName('header')[0].clientHeight;
8170
8201
  // console.dir(refArray.current[indexOfRef].wraperRef.current)
8171
8202
  // console.log(document.getElementsByTagName('header')[0].clientHeight)
8172
8203
  // console.log(refArray.current[indexOfRef].wraperRef.current.offsetTop)
8204
+
8205
+ setArticleScrollHeight(newOffsetTop);
8206
+
8173
8207
  window.scrollTo({ top: newOffsetTop, behavior: 'smooth' });
8174
8208
  //refArray.current[indexOfRef].wraperRef.current.scrollIntoView({ behavior: 'smooth', block: 'start' })
8175
8209
  }
@@ -8182,6 +8216,12 @@ var ArticleSeries = function ArticleSeries(_ref) {
8182
8216
  }
8183
8217
  };
8184
8218
 
8219
+ React.useEffect(function () {
8220
+ if (articleClicked === true) {
8221
+ onChangeArticle(Articles[articleIndex].param.current, 'top', Articles[articleIndex].title, Articles[articleIndex].summary, urlFor(Articles[articleIndex].thumbnail.asset).url());
8222
+ }
8223
+ }, [articleClicked]);
8224
+
8185
8225
  var onChangeArticle = function onChangeArticle(path, visibility, title, summary, shareImage) {
8186
8226
  var currentPath = window && window.location && window.location.pathname ? window.location.pathname.replace('?seriesArticle=', '') : '';
8187
8227
  var newPath = (router && router.asPath && router.asPath.split('?')[0]) + '?seriesArticle=' + path;
@@ -8221,7 +8261,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8221
8261
  var window = e.currentTarget;
8222
8262
  if (preVscroll > window.scrollY) {
8223
8263
  isScrollDown = false;
8224
- if (window.scrollY > articleContainerRef.current.offsetTop && preVscroll !== 0 && !upArrowClicked) {
8264
+ if (window.scrollY > articleContainerRef.current.offsetTop && preVscroll !== 0 && upArrowClicked === false && articleClicked === false) {
8225
8265
  arrowRef.current.style.visibility = 'visible';
8226
8266
  }
8227
8267
  } else if (preVscroll < window.scrollY) {
@@ -8235,8 +8275,15 @@ var ArticleSeries = function ArticleSeries(_ref) {
8235
8275
  if (preVscroll <= articleContainerRef.current.offsetTop) {
8236
8276
  arrowRef.current.style.visibility = 'hidden';
8237
8277
  }
8278
+ if (window.scrollY >= articleScrollHeight && articleClicked === true) {
8279
+ setArticleClicked(false);
8280
+ setSensorVisible(true);
8281
+ setUpArrowClicked(false);
8282
+ }
8238
8283
  if (window.scrollY === 0 && upArrowClicked === true) {
8239
- upArrowClicked = false;
8284
+ setUpArrowClicked(false);
8285
+ setSensorVisible(true);
8286
+ setArticleClicked(false);
8240
8287
  }
8241
8288
  };
8242
8289
 
@@ -8250,6 +8297,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8250
8297
  React.useLayoutEffect(function () {
8251
8298
  //console.log('useLayoutEffect')
8252
8299
  if (!firstLoad) {
8300
+ setUpArrowClicked(false);
8253
8301
  if (main.main_39) {
8254
8302
  grabLoadedAds();
8255
8303
  } else {
@@ -8292,26 +8340,34 @@ var ArticleSeries = function ArticleSeries(_ref) {
8292
8340
  }
8293
8341
  };
8294
8342
 
8295
- var handleArrowClick = function handleArrowClick() {
8296
- var newPath = router.asPath.split('?')[0];
8297
- var title = nodes.seriesTitle;
8298
- isScrollDown = true;
8299
- upArrowClicked = true;
8300
- arrowRef.current.style.visibility = 'hidden';
8301
- window.scrollTo({ top: 0, behavior: 'smooth' });
8302
- window.history.pushState({}, '', newPath);
8303
- document.title = title;
8343
+ React.useEffect(function () {
8344
+ console.log('sensorVisible Effect');
8345
+ if (sensorVisible === false && articleClicked === false) {
8346
+ var newPath = router.asPath.split('?')[0];
8347
+ var title = nodes.seriesTitle;
8348
+ isScrollDown = true;
8349
+ setUpArrowClicked(true);
8350
+ arrowRef.current.style.visibility = 'hidden';
8351
+ window.scrollTo({ top: 0, behavior: 'smooth' });
8352
+ window.history.pushState({}, '', newPath);
8353
+ document.title = title;
8304
8354
 
8305
- setCurrentURL(newPath);
8306
- setCurrentTitle(title);
8307
- if (rootArticle) {
8308
- setCurrentSummary(rootArticle.summary ? rootArticle.summary : '');
8309
- setCurrentThumbnail(urlFor(rootArticle.thumbnail.asset).url());
8310
- } else {
8311
- setCurrentSummary('');
8312
- setCurrentThumbnail('');
8355
+ setCurrentURL(newPath);
8356
+ setCurrentTitle(title);
8357
+ if (rootArticle) {
8358
+ setCurrentSummary(rootArticle.summary ? rootArticle.summary : '');
8359
+ setCurrentThumbnail(urlFor(rootArticle.thumbnail.asset).url());
8360
+ } else {
8361
+ setCurrentSummary('');
8362
+ setCurrentThumbnail('');
8363
+ }
8364
+ refreshAD(newPath);
8313
8365
  }
8314
- refreshAD(newPath);
8366
+ }, [sensorVisible]);
8367
+
8368
+ var handleArrowClick = function handleArrowClick() {
8369
+ console.log('handleArrowClick');
8370
+ setSensorVisible(false);
8315
8371
  };
8316
8372
 
8317
8373
  return React__default.createElement(
@@ -8375,6 +8431,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8375
8431
  React__default.createElement(
8376
8432
  InscreenSensor,
8377
8433
  {
8434
+ visible: sensorVisible,
8378
8435
  offSetTop: 120,
8379
8436
  className: 'inscreen-wrapper',
8380
8437
  key: '' + article.param.current,
@@ -8383,7 +8440,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8383
8440
  return refArray.current[index] = ele;
8384
8441
  },
8385
8442
  onChange: function onChange(visible) {
8386
- if (!upArrowClicked) {
8443
+ if (upArrowClicked === false && articleClicked === false) {
8387
8444
  if (visible === 'top' || visible === 'bottom' || visible === 'small-top') {
8388
8445
  onChangeArticle(article.param.current, visible, article.title, article.summary, urlFor(article.thumbnail.asset).url());
8389
8446
  }
@@ -8556,12 +8613,14 @@ var FigureComponent = function FigureComponent(props) {
8556
8613
  if (typeof window === 'undefined') return null;
8557
8614
 
8558
8615
  var node = props.node,
8559
- client = props.client;
8616
+ client = props.client,
8617
+ getSerializers = props.getSerializers;
8560
8618
 
8561
8619
 
8562
8620
  if (!node.asset) return null;
8563
8621
 
8564
8622
  var caption = node.caption,
8623
+ imgcaption = node.imgcaption,
8565
8624
  alt = node.alt,
8566
8625
  blank = node.blank,
8567
8626
  link = node.link,
@@ -8613,6 +8672,18 @@ var FigureComponent = function FigureComponent(props) {
8613
8672
  imageWidth = '100%';
8614
8673
  }
8615
8674
 
8675
+ var FigureCaption = React.useCallback(function () {
8676
+ if (imgcaption && imgcaption.length > 0) {
8677
+ return React__default.createElement(
8678
+ 'div',
8679
+ { className: 'figure-caption' },
8680
+ React__default.createElement(BlockContent.BlockContent, { blocks: imgcaption, serializers: getSerializers })
8681
+ );
8682
+ } else if (caption) {
8683
+ return React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } });
8684
+ } else return null;
8685
+ }, [caption, imgcaption]);
8686
+
8616
8687
  var figureStyle = disableTextWrap ? { maxWidth: '100%', width: imageWidth, margin: imageFloat !== 'none' ? imageFloat === 'left' ? '' : '0 0 0 auto' : '' } : {
8617
8688
  width: imageWidth,
8618
8689
  maxWidth: '100%',
@@ -8625,17 +8696,17 @@ var FigureComponent = function FigureComponent(props) {
8625
8696
  React__default.Fragment,
8626
8697
  null,
8627
8698
  React__default.createElement(
8628
- reactBootstrap.Figure,
8699
+ Figure$1,
8629
8700
  { className: '' + class_name, style: figureStyle },
8630
8701
  link ? React__default.createElement(
8631
8702
  'a',
8632
8703
  { target: blank ? '_blank' : '_self', href: link },
8633
- React__default.createElement(reactBootstrap.Figure.Image, { style: { maxWidth: '100%' }, className: 'figure-image', src: urlFor$3(node, client).url(), alt: alt && alt }),
8634
- caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
8704
+ React__default.createElement(Figure$1.Image, { style: { maxWidth: '100%' }, className: 'figure-image', src: urlFor$3(node, client).url(), alt: alt && alt }),
8705
+ React__default.createElement(FigureCaption, null)
8635
8706
  ) : React__default.createElement(
8636
8707
  React__default.Fragment,
8637
8708
  null,
8638
- React__default.createElement(reactBootstrap.Figure.Image, {
8709
+ React__default.createElement(Figure$1.Image, {
8639
8710
  style: { maxWidth: '100%', cursor: 'pointer', width: 'auto' },
8640
8711
  className: 'figure-image',
8641
8712
  src: urlFor$3(node, client).url(),
@@ -8645,7 +8716,7 @@ var FigureComponent = function FigureComponent(props) {
8645
8716
  setShowLightbox(true);
8646
8717
  }
8647
8718
  }),
8648
- caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
8719
+ React__default.createElement(FigureCaption, null)
8649
8720
  ),
8650
8721
  React__default.createElement(LightBox, {
8651
8722
  showLightbox: showLightbox,
@@ -8659,7 +8730,7 @@ var FigureComponent = function FigureComponent(props) {
8659
8730
  React__default.createElement(
8660
8731
  'style',
8661
8732
  { jsx: 'true' },
8662
- '\n .figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n '
8733
+ '\n .figure-caption,\n .figure-caption h1,\n .figure-caption h2,\n .figure-caption h3,\n .figure-caption h4,\n .figure-caption h5,\n .figure-caption h6,\n .figure-caption p,\n .figure-caption ul {\n color: #6c757d;\n font-size: 0.875rem;\n }\n '
8663
8734
  )
8664
8735
  );
8665
8736
  };
@@ -8688,7 +8759,8 @@ function useOutsideAlerter(ref, container, setOpenImg, setOpenImgSrc) {
8688
8759
 
8689
8760
  var MultiFigure = function MultiFigure(props) {
8690
8761
  var images = props.node.images,
8691
- client = props.client;
8762
+ client = props.client,
8763
+ getSerializers = props.getSerializers;
8692
8764
 
8693
8765
  var _useState = React.useState(false),
8694
8766
  _useState2 = slicedToArray._slicedToArray(_useState, 2),
@@ -8703,16 +8775,32 @@ var MultiFigure = function MultiFigure(props) {
8703
8775
  var lightboxImage = React.useRef(null);
8704
8776
  var lightboxContainer = React.useRef(null);
8705
8777
  useOutsideAlerter(lightboxImage, lightboxContainer, setOpenImg, setOpenImgSrc);
8778
+
8779
+ var FigureCaption = function FigureCaption(_ref) {
8780
+ var caption = _ref.caption,
8781
+ imgcaption = _ref.imgcaption;
8782
+
8783
+ if (imgcaption && imgcaption.length > 0) {
8784
+ return React__default.createElement(
8785
+ 'div',
8786
+ { className: 'multi-figure-caption' },
8787
+ React__default.createElement(BlockContent.BlockContent, { blocks: imgcaption, serializers: getSerializers })
8788
+ );
8789
+ } else if (caption) {
8790
+ return React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'multi-figure-caption\'>' + caption + '</span>' } });
8791
+ } else return null;
8792
+ };
8793
+
8706
8794
  if (images && images.length > 0) {
8707
8795
  return React__default.createElement(
8708
8796
  'div',
8709
8797
  { className: 'multi-figure-container' },
8710
8798
  React__default.createElement(
8711
- reactBootstrap.Row,
8799
+ Row,
8712
8800
  { noGutters: true },
8713
8801
  images.map(function (image, index) {
8714
8802
  return React__default.createElement(
8715
- reactBootstrap.Col,
8803
+ Col,
8716
8804
  { xs: 12, md: 12 / images.length, key: index },
8717
8805
  image.link ? React__default.createElement(
8718
8806
  'a',
@@ -8725,11 +8813,7 @@ var MultiFigure = function MultiFigure(props) {
8725
8813
  { once: true },
8726
8814
  React__default.createElement('img', { 'images-count': images.length, className: 'multi-figure-image', src: urlFor$4(image.asset, client).url(), alt: image.alt })
8727
8815
  ),
8728
- image.caption && React__default.createElement(
8729
- 'span',
8730
- { className: 'multi-figure-caption' },
8731
- image.caption
8732
- )
8816
+ React__default.createElement(FigureCaption, { caption: image.caption, imgcaption: image.imgcaption })
8733
8817
  )
8734
8818
  ) : React__default.createElement(
8735
8819
  'div',
@@ -8748,11 +8832,7 @@ var MultiFigure = function MultiFigure(props) {
8748
8832
  }
8749
8833
  })
8750
8834
  ),
8751
- image.caption && React__default.createElement(
8752
- 'span',
8753
- { className: 'multi-figure-caption' },
8754
- image.caption
8755
- )
8835
+ React__default.createElement(FigureCaption, { caption: image.caption, imgcaption: image.imgcaption })
8756
8836
  )
8757
8837
  );
8758
8838
  })
@@ -8765,7 +8845,7 @@ var MultiFigure = function MultiFigure(props) {
8765
8845
  React__default.createElement(
8766
8846
  'style',
8767
8847
  { jsx: 'true' },
8768
- '\n .multi-figure-container {\n margin-bottom: 1rem;\n }\n .multi-figure-image {\n width: 100%;\n height: auto;\n object-fit: cover;\n }\n .multi-figure-image-container {\n padding-right: 0.5rem;\n }\n /* Small devices (portrait tablets and phones, 767px and down) */\n @media (max-width: 767px) {\n .multi-figure-image-container {\n margin-bottom: 1rem;\n }\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media (min-width: 768px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 100px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 130px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 200px;\n }\n .multi-figure-container [class*=\'col-\'] + [class*=\'col-\'] {\n padding-left: 0.75rem;\n }\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media (min-width: 992px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 150px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 200px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 300px;\n }\n }\n\n .multi-figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n\n /* Styles the lightbox, removes it from sight and adds the fade-in transition */\n\n .lightbox-target {\n position: fixed;\n top: -100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.7);\n width: 100%;\n opacity: 0;\n -webkit-transition: opacity 0.5s ease-in-out;\n -moz-transition: opacity 0.5s ease-in-out;\n -o-transition: opacity 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n overflow: hidden;\n }\n\n .lightbox-target.close {\n opacity: 0;\n }\n\n /* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */\n\n .lightbox-target img {\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 0%;\n max-width: 0%;\n border: 3px solid white;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Styles the close link, adds the slide down transition */\n\n a.lightbox-close {\n display: block;\n width: 50px;\n height: 50px;\n box-sizing: border-box;\n background: white;\n color: black;\n text-decoration: none;\n position: absolute;\n top: -80px;\n right: 0;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:before {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:after {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(-45deg);\n -moz-transform: rotate(-45deg);\n -o-transform: rotate(-45deg);\n transform: rotate(-45deg);\n }\n\n /* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */\n\n .lightbox-target.open {\n opacity: 1;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 3000000;\n }\n\n .lightbox-target.open img {\n max-height: 100%;\n max-width: 100%;\n }\n\n .lightbox-target.open a.lightbox-close {\n top: 0px;\n }\n '
8848
+ '\n .multi-figure-caption,\n .multi-figure-caption h1,\n .multi-figure-caption h2,\n .multi-figure-caption h3,\n .multi-figure-caption h4,\n .multi-figure-caption h5,\n .multi-figure-caption h6,\n .multi-figure-caption p,\n .multi-figure-caption ul {\n color: #6c757d;\n font-size: 0.875rem;\n }\n\n .multi-figure-container {\n margin-bottom: 1rem;\n }\n .multi-figure-image {\n width: 100%;\n height: auto;\n object-fit: cover;\n }\n .multi-figure-image-container {\n padding-right: 0.5rem;\n }\n /* Small devices (portrait tablets and phones, 767px and down) */\n @media (max-width: 767px) {\n .multi-figure-image-container {\n margin-bottom: 1rem;\n }\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media (min-width: 768px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 100px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 130px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 200px;\n }\n .multi-figure-container [class*=\'col-\'] + [class*=\'col-\'] {\n padding-left: 0.75rem;\n }\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media (min-width: 992px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 150px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 200px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 300px;\n }\n }\n\n /* Styles the lightbox, removes it from sight and adds the fade-in transition */\n\n .lightbox-target {\n position: fixed;\n top: -100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.7);\n width: 100%;\n opacity: 0;\n -webkit-transition: opacity 0.5s ease-in-out;\n -moz-transition: opacity 0.5s ease-in-out;\n -o-transition: opacity 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n overflow: hidden;\n }\n\n .lightbox-target.close {\n opacity: 0;\n }\n\n /* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */\n\n .lightbox-target img {\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 0%;\n max-width: 0%;\n border: 3px solid white;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Styles the close link, adds the slide down transition */\n\n a.lightbox-close {\n display: block;\n width: 50px;\n height: 50px;\n box-sizing: border-box;\n background: white;\n color: black;\n text-decoration: none;\n position: absolute;\n top: -80px;\n right: 0;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:before {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:after {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(-45deg);\n -moz-transform: rotate(-45deg);\n -o-transform: rotate(-45deg);\n transform: rotate(-45deg);\n }\n\n /* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */\n\n .lightbox-target.open {\n opacity: 1;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 3000000;\n }\n\n .lightbox-target.open img {\n max-height: 100%;\n max-width: 100%;\n }\n\n .lightbox-target.open a.lightbox-close {\n top: 0px;\n }\n '
8769
8849
  )
8770
8850
  );
8771
8851
  }
@@ -8874,12 +8954,12 @@ var getSerializers = function getSerializers() {
8874
8954
  figure: function figure(_ref4) {
8875
8955
  var node = _ref4.node;
8876
8956
 
8877
- return React__default.createElement(Figure, { node: node, client: client, contextualADFlag: contextualADFlag });
8957
+ return React__default.createElement(Figure, { node: node, client: client, contextualADFlag: contextualADFlag, getSerializers: getSerializers.apply(undefined, props) });
8878
8958
  },
8879
8959
  multifigure: function multifigure(_ref5) {
8880
8960
  var node = _ref5.node;
8881
8961
 
8882
- return React__default.createElement(MultiFigure, { node: node, client: client });
8962
+ return React__default.createElement(MultiFigure, { node: node, client: client, getSerializers: getSerializers.apply(undefined, props) });
8883
8963
  },
8884
8964
  slideshow: function slideshow(_ref6) {
8885
8965
  var node = _ref6.node;
@@ -9059,6 +9139,5 @@ var getSerializers = function getSerializers() {
9059
9139
  };
9060
9140
  };
9061
9141
 
9062
- exports.InscreenSensor = InscreenSensor;
9063
9142
  exports.getSerializers = getSerializers;
9064
9143
  exports.renderAuthor = renderAuthor;
package/dist/cjs/index.js CHANGED
@@ -83,11 +83,12 @@ require('react-bootstrap/Form');
83
83
  require('./index-5be2866f.js');
84
84
  require('./js.cookie-a511c430.js');
85
85
  var CMEDeck = require('./CMEDeck.js');
86
- var getSerializers = require('./index-c0bfab13.js');
86
+ var getSerializers = require('./index-7a6308f1.js');
87
87
  require('./util-f2c1b65b.js');
88
88
  require('./brightcove-react-player-loader.es-156bd4d6.js');
89
89
  require('react-bootstrap/Pagination');
90
90
  require('next/head');
91
+ require('react-bootstrap/Figure');
91
92
  var ExternalResources = require('./ExternalResources.js');
92
93
  var Column1 = require('./Column1.js');
93
94
  var SideFooter = require('./SideFooter.js');
@@ -42,11 +42,12 @@ import './iconBase-602d52fe.js';
42
42
  import './index.esm-29e48d38.js';
43
43
  import Button from 'react-bootstrap/Button';
44
44
  import { m as momentTimezone } from './index-d2f90501.js';
45
- import { g as getSerializers } from './index-754010eb.js';
45
+ import { g as getSerializers } from './index-d3fdad5e.js';
46
46
  import './util-7700fc59.js';
47
47
  import './brightcove-react-player-loader.es-83f53e4e.js';
48
48
  import 'react-bootstrap/Pagination';
49
49
  import 'next/head';
50
+ import 'react-bootstrap/Figure';
50
51
 
51
52
  var ExternalResources = function ExternalResources(props) {
52
53
  var resources = props.resources,
@@ -55,7 +56,11 @@ var ExternalResources = function ExternalResources(props) {
55
56
  _props$cta = props.cta,
56
57
  cta = _props$cta === undefined ? 'Learn More' : _props$cta,
57
58
  _props$url = props.url,
58
- url = _props$url === undefined ? 'resources' : _props$url;
59
+ url = _props$url === undefined ? 'resources' : _props$url,
60
+ _props$recentTitle = props.recentTitle,
61
+ recentTitle = _props$recentTitle === undefined ? 'Recent' : _props$recentTitle,
62
+ _props$archiveTitle = props.archiveTitle,
63
+ archiveTitle = _props$archiveTitle === undefined ? 'Archive' : _props$archiveTitle;
59
64
 
60
65
  var _useState = useState(display && (display === 'recent' || display === 'archived') ? display : 'recent'),
61
66
  _useState2 = _slicedToArray(_useState, 2),
@@ -79,7 +84,7 @@ var ExternalResources = function ExternalResources(props) {
79
84
  return 'recent';
80
85
  });
81
86
  }, className: active === 'recent' ? 'active' : '' },
82
- 'Recent'
87
+ recentTitle
83
88
  ),
84
89
  React__default.createElement(
85
90
  'div',
@@ -88,13 +93,13 @@ var ExternalResources = function ExternalResources(props) {
88
93
  return 'archived';
89
94
  });
90
95
  }, className: active === 'archived' ? 'active' : '' },
91
- 'Archive'
96
+ archiveTitle
92
97
  )
93
98
  ),
94
- resources[active].length > 0 ? resources[active].map(function (r, i) {
99
+ resources[active].length > 0 ? resources[active].map(function (r) {
95
100
  return React__default.createElement(
96
101
  'div',
97
- { key: i, className: 'resource' },
102
+ { key: r._id, className: 'resource' },
98
103
  React__default.createElement(
99
104
  'div',
100
105
  { id: 'thumb' },
@@ -175,7 +180,7 @@ var ExternalResources = function ExternalResources(props) {
175
180
  }) : React__default.createElement(
176
181
  'p',
177
182
  null,
178
- 'No ' + active + ' resources available. '
183
+ 'No content available.'
179
184
  ),
180
185
  React__default.createElement(
181
186
  'style',
@@ -51,11 +51,12 @@ import QueueDeckExpanded from './QueueDeckExpanded.js';
51
51
  import './iconBase-602d52fe.js';
52
52
  import './index.esm-29e48d38.js';
53
53
  import 'react-bootstrap/Button';
54
- import { g as getSerializers } from './index-754010eb.js';
54
+ import { g as getSerializers } from './index-d3fdad5e.js';
55
55
  import './util-7700fc59.js';
56
56
  import './brightcove-react-player-loader.es-83f53e4e.js';
57
57
  import 'react-bootstrap/Pagination';
58
58
  import 'next/head';
59
+ import 'react-bootstrap/Figure';
59
60
  import 'react-bootstrap/Carousel';
60
61
  import Feature from './Feature.js';
61
62
  import 'react-bootstrap/Breadcrumb';
@@ -46,25 +46,27 @@ var VideoSeriesListing = function (_React$Component) {
46
46
 
47
47
  return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = VideoSeriesListing.__proto__ || _Object$getPrototypeOf(VideoSeriesListing)).call.apply(_ref, [this].concat(args))), _this), _this.page = _this.props.page, _this.mapping = _this.props.mapping, _this.data = _this.props.dataRecord, _this.query = _this.props.query, _this.params = _this.props.params, _this.today = moment().utc().format(), _this.dataArr = [_this.data], _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.state = {
48
48
  data: _this.dataArr.map(function (item) {
49
- var tempObj = item;
50
- if (tempObj.body) {
51
- var filteredBody = tempObj.body.map(function (item) {
52
- if (item._type === 'articleSeries') {
53
- var innerObj = item;
54
- var filteredArticles = innerObj.articles.filter(function (article) {
55
- if ((article.is_visible === true || !article.hasOwnProperty('is_visible')) && (_this.today >= article.published || !article.hasOwnProperty('published'))) {
56
- return article;
57
- }
58
- });
59
- innerObj.body = filteredArticles;
60
- return innerObj;
61
- } else {
62
- return item;
63
- }
64
- });
49
+ var tempObj = item.map(function (arrItem) {
50
+ if (arrItem.body) {
51
+ var filteredBody = arrItem.body.map(function (item) {
52
+ if (item._type === 'youtubeGallery') {
53
+ var innerObj = item;
54
+ var filteredArticles = innerObj.videos.filter(function (video) {
55
+ if ((video.is_visible === true || !video.hasOwnProperty('is_visible')) && (_this.today >= video.published || !video.hasOwnProperty('published'))) {
56
+ return video;
57
+ }
58
+ });
59
+ innerObj.videos = filteredArticles;
60
+ return innerObj;
61
+ } else {
62
+ return item;
63
+ }
64
+ });
65
65
 
66
- tempObj.body = filteredBody;
67
- }
66
+ arrItem.body = filteredBody;
67
+ }
68
+ return arrItem;
69
+ });
68
70
  return tempObj;
69
71
  }),
70
72
  per: _this.params ? _this.params.to : 2,