@mjhls/mjh-framework 1.0.158 → 1.0.160

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -14,7 +14,8 @@ var Col = _interopDefault(require('react-bootstrap/Col'));
14
14
  var Card = _interopDefault(require('react-bootstrap/Card'));
15
15
  var moment = _interopDefault(require('moment'));
16
16
  var Link = _interopDefault(require('next/link'));
17
- var router = require('next/router');
17
+ var Router = require('next/router');
18
+ var Router__default = _interopDefault(Router);
18
19
  var LazyLoad = _interopDefault(require('react-lazyload'));
19
20
  var Media = _interopDefault(require('react-bootstrap/Media'));
20
21
  var reactBootstrap = require('react-bootstrap');
@@ -4757,19 +4758,19 @@ var DeckContent = function (_React$Component) {
4757
4758
  var _this$props = _this.props,
4758
4759
  seoPaginate = _this$props.seoPaginate,
4759
4760
  pageview = _this$props.pageview,
4760
- router$$1 = _this$props.router;
4761
+ router = _this$props.router;
4761
4762
  var currentPage = _this.state.currentPage;
4762
4763
 
4763
4764
  if (seoPaginate) {
4764
- var path = router$$1.asPath;
4765
+ var path = router.asPath;
4765
4766
  var qrIndex = path.indexOf('?');
4766
- var pathname = router$$1.pathname;
4767
+ var pathname = router.pathname;
4767
4768
  var queryString = '';
4768
4769
 
4769
4770
  if (qrIndex > 0) {
4770
4771
  path = path.substring(1, qrIndex);
4771
4772
 
4772
- var partialQS = router$$1.asPath.substring(qrIndex + 1);
4773
+ var partialQS = router.asPath.substring(qrIndex + 1);
4773
4774
  var partialQSArr = partialQS.split('&');
4774
4775
 
4775
4776
  // exclude page=xxx from query string
@@ -4815,7 +4816,7 @@ var DeckContent = function (_React$Component) {
4815
4816
 
4816
4817
  pageview(newPath);
4817
4818
 
4818
- router$$1.push(pathname, newPath, {
4819
+ router.push(pathname, newPath, {
4819
4820
  shallow: true
4820
4821
  });
4821
4822
  });
@@ -5080,7 +5081,7 @@ var DeckContent = function (_React$Component) {
5080
5081
  return DeckContent;
5081
5082
  }(React__default.Component);
5082
5083
 
5083
- var ContentCard = router.withRouter(DeckContent);
5084
+ var ContentCard = Router.withRouter(DeckContent);
5084
5085
 
5085
5086
  /**
5086
5087
  * Checks if `value` is classified as an `Array` object.
@@ -6160,19 +6161,19 @@ var GridContent = function (_React$Component) {
6160
6161
  var _this$props = _this.props,
6161
6162
  seoPaginate = _this$props.seoPaginate,
6162
6163
  pageview = _this$props.pageview,
6163
- router$$1 = _this$props.router;
6164
+ router = _this$props.router;
6164
6165
  var currentPage = _this.state.currentPage;
6165
6166
 
6166
6167
  if (seoPaginate) {
6167
- var path = router$$1.asPath;
6168
+ var path = router.asPath;
6168
6169
  var qrIndex = path.indexOf('?');
6169
- var pathname = router$$1.pathname;
6170
+ var pathname = router.pathname;
6170
6171
  var queryString = '';
6171
6172
 
6172
6173
  if (qrIndex > 0) {
6173
6174
  path = path.substring(1, qrIndex);
6174
6175
 
6175
- var partialQS = router$$1.asPath.substring(qrIndex + 1);
6176
+ var partialQS = router.asPath.substring(qrIndex + 1);
6176
6177
  var partialQSArr = partialQS.split('&');
6177
6178
 
6178
6179
  // exclude page=xxx from query string
@@ -6207,7 +6208,7 @@ var GridContent = function (_React$Component) {
6207
6208
 
6208
6209
  pageview(newPath);
6209
6210
 
6210
- router$$1.push(pathname, newPath, {
6211
+ router.push(pathname, newPath, {
6211
6212
  shallow: true
6212
6213
  });
6213
6214
  });
@@ -6651,7 +6652,7 @@ var GridContent = function (_React$Component) {
6651
6652
  return GridContent;
6652
6653
  }(React__default.Component);
6653
6654
 
6654
- var GridContent$1 = router.withRouter(GridContent);
6655
+ var GridContent$1 = Router.withRouter(GridContent);
6655
6656
 
6656
6657
  var DeckQueue = function (_React$Component) {
6657
6658
  inherits(DeckQueue, _React$Component);
@@ -6744,19 +6745,19 @@ var DeckQueue = function (_React$Component) {
6744
6745
  var _this$props = _this.props,
6745
6746
  seoPaginate = _this$props.seoPaginate,
6746
6747
  pageview = _this$props.pageview,
6747
- router$$1 = _this$props.router;
6748
+ router = _this$props.router;
6748
6749
  var currentPage = _this.state.currentPage;
6749
6750
 
6750
6751
  if (seoPaginate) {
6751
- var path = router$$1.asPath;
6752
+ var path = router.asPath;
6752
6753
  var qrIndex = path.indexOf('?');
6753
- var pathname = router$$1.pathname;
6754
+ var pathname = router.pathname;
6754
6755
  var queryString = '';
6755
6756
 
6756
6757
  if (qrIndex > 0) {
6757
6758
  path = path.substring(1, qrIndex);
6758
6759
 
6759
- var partialQS = router$$1.asPath.substring(qrIndex + 1);
6760
+ var partialQS = router.asPath.substring(qrIndex + 1);
6760
6761
  var partialQSArr = partialQS.split('&');
6761
6762
 
6762
6763
  // exclude page=xxx from query string
@@ -6791,7 +6792,7 @@ var DeckQueue = function (_React$Component) {
6791
6792
 
6792
6793
  pageview(newPath);
6793
6794
 
6794
- router$$1.push(pathname, newPath, {
6795
+ router.push(pathname, newPath, {
6795
6796
  shallow: true
6796
6797
  });
6797
6798
  });
@@ -6988,7 +6989,7 @@ var DeckQueue = function (_React$Component) {
6988
6989
  return DeckQueue;
6989
6990
  }(React__default.Component);
6990
6991
 
6991
- var Queue = router.withRouter(DeckQueue);
6992
+ var Queue = Router.withRouter(DeckQueue);
6992
6993
 
6993
6994
  var ThumbnailCard = function ThumbnailCard(_ref) {
6994
6995
  var size = _ref.size,
@@ -7555,17 +7556,17 @@ var loadData = function loadData(values, query, client, params, setData, setScro
7555
7556
  });
7556
7557
  };
7557
7558
 
7558
- var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pageview, router$$1, currentPage, setCurrentPage) {
7559
+ var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage) {
7559
7560
  if (seoPaginate) {
7560
- var path = router$$1.asPath;
7561
+ var path = router.asPath;
7561
7562
  var qrIndex = path.indexOf('?');
7562
- var pathname = router$$1.pathname;
7563
+ var pathname = router.pathname;
7563
7564
  var queryString = '';
7564
7565
 
7565
7566
  if (qrIndex > 0) {
7566
7567
  path = path.substring(1, qrIndex);
7567
7568
 
7568
- var partialQS = router$$1.asPath.substring(qrIndex + 1);
7569
+ var partialQS = router.asPath.substring(qrIndex + 1);
7569
7570
  var partialQSArr = partialQS.split('&');
7570
7571
 
7571
7572
  // exclude page=xxx from query string
@@ -7595,7 +7596,7 @@ var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pagevi
7595
7596
  }
7596
7597
  var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
7597
7598
  pageview(newPath);
7598
- router$$1.push(pathname, newPath, {
7599
+ router.push(pathname, newPath, {
7599
7600
  shallow: true
7600
7601
  });
7601
7602
  }
@@ -7653,7 +7654,7 @@ var checkExternalUrl = function checkExternalUrl(url) {
7653
7654
  return new RegExp(['http', 'https'].join('|')).test(url);
7654
7655
  };
7655
7656
 
7656
- var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems) {
7657
+ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems) {
7657
7658
  var numberOfItemsBeforeAd = 6;
7658
7659
  return React__default.createElement(
7659
7660
  'div',
@@ -7672,7 +7673,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
7672
7673
  {
7673
7674
  key: article._id ? article._id : index$$1,
7674
7675
  onChange: function onChange(isVisible) {
7675
- isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router$$1, currentPage, setCurrentPage);
7676
+ isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
7676
7677
  } },
7677
7678
  React__default.createElement(
7678
7679
  React__default.Fragment,
@@ -7696,16 +7697,12 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
7696
7697
  reactBootstrap.Media.Body,
7697
7698
  null,
7698
7699
  React__default.createElement(
7699
- Link,
7700
- { href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
7701
- React__default.createElement(
7702
- 'a',
7703
- null,
7704
- article.title && React__default.createElement(
7705
- 'h4',
7706
- { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
7707
- article.title
7708
- )
7700
+ 'a',
7701
+ { href: article.url.current, target: '_blank' },
7702
+ article.title && React__default.createElement(
7703
+ 'h4',
7704
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
7705
+ article.title
7709
7706
  )
7710
7707
  ),
7711
7708
  showPublished && article.published && React__default.createElement(
@@ -7749,7 +7746,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
7749
7746
  {
7750
7747
  key: article._id ? article._id : index$$1,
7751
7748
  onChange: function onChange(isVisible) {
7752
- isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router$$1, currentPage, setCurrentPage);
7749
+ isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
7753
7750
  } },
7754
7751
  React__default.createElement(
7755
7752
  React__default.Fragment,
@@ -7762,7 +7759,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
7762
7759
  style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
7763
7760
  (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
7764
7761
  Link,
7765
- { href: article.url.current, as: mapping[contentCategoryName] + '/' + article.url.current },
7762
+ { href: article.url.current },
7766
7763
  React__default.createElement(
7767
7764
  'a',
7768
7765
  { className: 'feature-wrapper' },
@@ -7778,7 +7775,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
7778
7775
  null,
7779
7776
  React__default.createElement(
7780
7777
  Link,
7781
- { href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
7778
+ { href: article.url.current },
7782
7779
  React__default.createElement(
7783
7780
  'a',
7784
7781
  null,
@@ -7832,7 +7829,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
7832
7829
  {
7833
7830
  key: article._id ? article._id : index$$1,
7834
7831
  onChange: function onChange(isVisible) {
7835
- isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router$$1, currentPage, setCurrentPage);
7832
+ isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
7836
7833
  } },
7837
7834
  React__default.createElement(
7838
7835
  React__default.Fragment,
@@ -7947,7 +7944,7 @@ var usePrevious = function usePrevious(value) {
7947
7944
  };
7948
7945
 
7949
7946
  var QueueDeckExpanded = function QueueDeckExpanded(props) {
7950
- var router$$1 = router.useRouter();
7947
+ var router = Router.useRouter();
7951
7948
  var initialData = props.dataRecord,
7952
7949
  client = props.client,
7953
7950
  params = props.params,
@@ -8021,7 +8018,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
8021
8018
  React__default.createElement(
8022
8019
  reactBootstrap.Container,
8023
8020
  null,
8024
- cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems)
8021
+ cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems)
8025
8022
  )
8026
8023
  ),
8027
8024
  React__default.createElement(
@@ -8035,7 +8032,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
8035
8032
  React__default.createElement(
8036
8033
  reactBootstrap.Container,
8037
8034
  null,
8038
- cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems)
8035
+ cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems)
8039
8036
  ),
8040
8037
  React__default.createElement(
8041
8038
  'div',
@@ -8247,19 +8244,19 @@ var VideoSeriesListing = function (_React$Component) {
8247
8244
  var _this$props = _this.props,
8248
8245
  seoPaginate = _this$props.seoPaginate,
8249
8246
  pageview = _this$props.pageview,
8250
- router$$1 = _this$props.router;
8247
+ router = _this$props.router;
8251
8248
  var currentPage = _this.state.currentPage;
8252
8249
 
8253
8250
  if (seoPaginate) {
8254
- var path = router$$1.asPath;
8251
+ var path = router.asPath;
8255
8252
  var qrIndex = path.indexOf('?');
8256
- var pathname = router$$1.pathname;
8253
+ var pathname = router.pathname;
8257
8254
  var queryString = '';
8258
8255
 
8259
8256
  if (qrIndex > 0) {
8260
8257
  path = path.substring(1, qrIndex);
8261
8258
 
8262
- var partialQS = router$$1.asPath.substring(qrIndex + 1);
8259
+ var partialQS = router.asPath.substring(qrIndex + 1);
8263
8260
  var partialQSArr = partialQS.split('&');
8264
8261
 
8265
8262
  // exclude page=xxx from query string
@@ -8294,7 +8291,7 @@ var VideoSeriesListing = function (_React$Component) {
8294
8291
 
8295
8292
  pageview(newPath);
8296
8293
 
8297
- router$$1.push(pathname, newPath, {
8294
+ router.push(pathname, newPath, {
8298
8295
  shallow: true
8299
8296
  });
8300
8297
  });
@@ -8392,7 +8389,7 @@ var VideoSeriesListing = function (_React$Component) {
8392
8389
  }]);
8393
8390
  return VideoSeriesListing;
8394
8391
  }(React__default.Component);
8395
- var VideoSeriesListing$1 = router.withRouter(VideoSeriesListing);
8392
+ var VideoSeriesListing$1 = Router.withRouter(VideoSeriesListing);
8396
8393
 
8397
8394
  var MasterDeck = function (_React$Component) {
8398
8395
  inherits(MasterDeck, _React$Component);
@@ -8506,19 +8503,19 @@ var MasterDeck = function (_React$Component) {
8506
8503
  var _this$props2 = _this.props,
8507
8504
  seoPaginate = _this$props2.seoPaginate,
8508
8505
  pageview = _this$props2.pageview,
8509
- router$$1 = _this$props2.router;
8506
+ router = _this$props2.router;
8510
8507
  var currentPage = _this.state.currentPage;
8511
8508
 
8512
8509
  if (seoPaginate) {
8513
- var path = router$$1.asPath;
8510
+ var path = router.asPath;
8514
8511
  var qrIndex = path.indexOf('?');
8515
- var pathname = router$$1.pathname;
8512
+ var pathname = router.pathname;
8516
8513
  var queryString = '';
8517
8514
 
8518
8515
  if (qrIndex > 0) {
8519
8516
  path = path.substring(1, qrIndex);
8520
8517
 
8521
- var partialQS = router$$1.asPath.substring(qrIndex + 1);
8518
+ var partialQS = router.asPath.substring(qrIndex + 1);
8522
8519
  var partialQSArr = partialQS.split('&');
8523
8520
 
8524
8521
  // exclude page=xxx from query string
@@ -8564,7 +8561,7 @@ var MasterDeck = function (_React$Component) {
8564
8561
 
8565
8562
  pageview(newPath);
8566
8563
 
8567
- router$$1.push(pathname, newPath, {
8564
+ router.push(pathname, newPath, {
8568
8565
  shallow: true
8569
8566
  });
8570
8567
  });
@@ -8764,7 +8761,7 @@ var MasterDeck = function (_React$Component) {
8764
8761
  return MasterDeck;
8765
8762
  }(React__default.Component);
8766
8763
 
8767
- var MasterDeck$1 = router.withRouter(MasterDeck);
8764
+ var MasterDeck$1 = Router.withRouter(MasterDeck);
8768
8765
 
8769
8766
  var PublicationDeck = function PublicationDeck(props) {
8770
8767
  var data = props.data,
@@ -9020,10 +9017,11 @@ var SideFooter = function SideFooter(props) {
9020
9017
  /*
9021
9018
  useage example: <SideFooter cache={props.cache} logo='/an_mjhls_brand_logo.png' />
9022
9019
  */
9023
- var _props$cache$siteSett = props.cache.siteSettingCache,
9024
- socialLinks = _props$cache$siteSett.socialLinks,
9025
- footerLinks = _props$cache$siteSett.footerLinks,
9026
- name = _props$cache$siteSett.name;
9020
+ var _get = get_1(props, 'cache.siteSettingCache', {}),
9021
+ socialLinks = _get.socialLinks,
9022
+ footerLinks = _get.footerLinks,
9023
+ name = _get.name;
9024
+
9027
9025
  var logo = props.logo;
9028
9026
 
9029
9027
  var year = new Date().getFullYear();
@@ -9525,7 +9523,7 @@ var Search = function Search(props) {
9525
9523
  _props$device = props.device,
9526
9524
  device = _props$device === undefined ? 'desktop' : _props$device;
9527
9525
 
9528
- var router$$1 = router.useRouter();
9526
+ var router = Router.useRouter();
9529
9527
 
9530
9528
  var _useState = React.useState(''),
9531
9529
  _useState2 = slicedToArray(_useState, 2),
@@ -9534,7 +9532,7 @@ var Search = function Search(props) {
9534
9532
 
9535
9533
  var submitSearch = function submitSearch(e) {
9536
9534
  e.preventDefault();
9537
- router$$1.push({
9535
+ router.push({
9538
9536
  pathname: '/search',
9539
9537
  query: { searchTerm: searchKey }
9540
9538
  });
@@ -10752,7 +10750,7 @@ var FigureComponent = function FigureComponent(_ref) {
10752
10750
  var screenWidth = window.innerWidth;
10753
10751
  if (screenWidth > 1000) {
10754
10752
  if (widthP === 'auto') {
10755
- setimageWidth('30%');
10753
+ if (imgFloat === 'none') setimageWidth('auto');else setimageWidth('30%');
10756
10754
  } else {
10757
10755
  setimageWidth(widthP + '%');
10758
10756
  }
@@ -10763,12 +10761,12 @@ var FigureComponent = function FigureComponent(_ref) {
10763
10761
  var screenWidth = window.innerWidth;
10764
10762
  if (screenWidth > 1000) {
10765
10763
  if (widthP === 'auto') {
10766
- setimageWidth('30%');
10764
+ if (imgFloat === 'none') setimageWidth('auto');else setimageWidth('30%');
10767
10765
  } else {
10768
10766
  setimageWidth(widthP + '%');
10769
10767
  }
10770
10768
  }
10771
- }, [widthP]);
10769
+ }, [widthP, imgFloat]);
10772
10770
 
10773
10771
  React.useEffect(function () {
10774
10772
  var screenWidth = window.innerWidth;
@@ -10787,20 +10785,17 @@ var FigureComponent = function FigureComponent(_ref) {
10787
10785
  'a',
10788
10786
  { href: link, target: blank ? '_blank' : '_self' },
10789
10787
  React__default.createElement(reactBootstrap.Figure.Image, { style: { width: '100%' }, className: 'figure-image', ref: imgElement, onLoad: loadImg, src: urlFor$1(node$$1, client).url(), alt: alt && alt }),
10790
- caption && React__default.createElement(
10791
- reactBootstrap.Figure.Caption,
10792
- { style: { width: '100%', maxWidth: '100%' } },
10793
- caption
10794
- )
10788
+ caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
10795
10789
  ) : React__default.createElement(
10796
10790
  React__default.Fragment,
10797
10791
  null,
10798
10792
  React__default.createElement(reactBootstrap.Figure.Image, { style: { width: '100%' }, className: 'figure-image', ref: imgElement, onLoad: loadImg, src: urlFor$1(node$$1, client).url(), alt: alt && alt }),
10799
- caption && React__default.createElement(
10800
- reactBootstrap.Figure.Caption,
10801
- { style: { width: '100%', maxWidth: '100%' } },
10802
- caption
10803
- )
10793
+ caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
10794
+ ),
10795
+ React__default.createElement(
10796
+ 'style',
10797
+ { jsx: 'true' },
10798
+ '\n figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n '
10804
10799
  )
10805
10800
  );
10806
10801
  };
@@ -10809,10 +10804,10 @@ var urlFor$2 = function urlFor(source, builder) {
10809
10804
  return builder.image(source);
10810
10805
  };
10811
10806
 
10812
- var onChangeSlide = function onChangeSlide(selectedIndex, pageview, setCarouselIndex, asPath) {
10813
- setCarouselIndex(selectedIndex);
10814
- lib_3.refresh();
10815
- if (pageview) pageview(asPath);
10807
+ var onChangeSlide = function onChangeSlide(selectedIndex, router) {
10808
+ var pageNumber = selectedIndex + 1;
10809
+ var href = '/view/' + router.query.url + '/?page=' + pageNumber;
10810
+ Router__default.push(router.pathname, pageNumber > 1 ? href : '/view/' + router.query.url, { shallow: true });
10816
10811
  };
10817
10812
 
10818
10813
  var Slideshow = function Slideshow(_ref) {
@@ -10820,7 +10815,7 @@ var Slideshow = function Slideshow(_ref) {
10820
10815
  client = _ref.client,
10821
10816
  pageview = _ref.pageview;
10822
10817
 
10823
- var router$$1 = router.useRouter();
10818
+ var router = Router.useRouter();
10824
10819
 
10825
10820
  var _useState = React.useState(0),
10826
10821
  _useState2 = slicedToArray(_useState, 2),
@@ -10829,23 +10824,34 @@ var Slideshow = function Slideshow(_ref) {
10829
10824
 
10830
10825
  var builder = imageUrlBuilder(client);
10831
10826
 
10827
+ React.useEffect(function () {
10828
+ var itemArr = router.asPath.split('?page=');
10829
+ var pageNumber = parseInt(itemArr[1]);
10830
+ if (!pageNumber || isNaN(pageNumber) || pageNumber > slides.length) {
10831
+ setCarouselIndex(0);
10832
+ } else {
10833
+ setCarouselIndex(parseInt(itemArr[1]) - 1);
10834
+ }
10835
+ }, [router]);
10836
+
10837
+ React.useEffect(function () {
10838
+ lib_3.refresh();
10839
+ if (pageview) pageview(router.asPath);
10840
+ }, [router]);
10841
+
10832
10842
  return React__default.createElement(
10833
10843
  'div',
10834
10844
  { className: 'mt-3 mb-3' },
10835
10845
  React__default.createElement(
10836
10846
  reactBootstrap.Carousel,
10837
10847
  { activeIndex: carouselIndex, onSelect: function onSelect(selectedIndex, e) {
10838
- return onChangeSlide(selectedIndex, pageview, setCarouselIndex, router$$1.asPath);
10848
+ return onChangeSlide(selectedIndex, router);
10839
10849
  } },
10840
10850
  slides && slides.map(function (slide) {
10841
10851
  return React__default.createElement(
10842
10852
  reactBootstrap.Carousel.Item,
10843
10853
  { key: slide._key },
10844
- React__default.createElement('img', {
10845
- src: slide.asset && urlFor$2(slide.asset, builder).url(),
10846
- alt: slide.alt && slide.alt,
10847
- style: { width: '100%' }
10848
- }),
10854
+ React__default.createElement('img', { src: slide.asset && urlFor$2(slide.asset, builder).url(), alt: slide.alt && slide.alt, style: { width: '100%' } }),
10849
10855
  slide.caption && React__default.createElement(
10850
10856
  'p',
10851
10857
  { className: 'p-2' },
@@ -14399,7 +14405,7 @@ var Sidebar = function Sidebar(_ref) {
14399
14405
 
14400
14406
  return React__default.createElement(
14401
14407
  'article',
14402
- { className: 'sidebar', style: { background: '#eee' } },
14408
+ { className: 'sidebar' },
14403
14409
  React__default.createElement(
14404
14410
  'div',
14405
14411
  null,
@@ -14413,7 +14419,7 @@ var Sidebar = function Sidebar(_ref) {
14413
14419
  React__default.createElement(
14414
14420
  'style',
14415
14421
  { jsx: 'true' },
14416
- '\n .sidebar {\n width: 40%;\n padding: 1rem 0 0;\n margin-left: 1rem;\n margin-right: 10%;\n }\n @media screen and (max-width: 991px) {\n .sidebar {\n width: unset;\n padding: 1.25rem;\n margin-left: 1rem;\n margin-right: 1rem;\n }\n }\n '
14422
+ '\n .sidebar {\n clear: both;\n float: right;\n background-color: #eee;\n width: 40%;\n padding: 1rem;\n margin: 0 0 1rem 1rem;\n }\n @media screen and (max-width: 991px) {\n .sidebar {\n float: none;\n width: auto;\n margin: 1rem 0;\n }\n }\n '
14417
14423
  )
14418
14424
  );
14419
14425
  };
@@ -14538,16 +14544,19 @@ var Video = function Video(_ref) {
14538
14544
  if (videoID) {
14539
14545
  return React__default.createElement(ReactPlayerLoader, { accountId: accountIDs.brightcove.accountId, videoId: videoID, playerId: accountIDs.brightcove.playerId, attrs: { className: 'brightcove' } });
14540
14546
  } else if (experienceID) {
14541
- return React__default.createElement('iframe', {
14542
- src: 'https://players.brightcove.net/' + accountIDs.brightcove.accountId + '/experience_' + experienceID + '/index.html',
14543
- allowFullScreen: 'true',
14544
- webkitallowfullscreen: 'true',
14545
- mozallowfullscreen: 'true',
14546
- frameBorder: 'none',
14547
- scrolling: 'no',
14548
- height: '411',
14549
- width: '100%'
14550
- });
14547
+ return React__default.createElement(
14548
+ 'div',
14549
+ { className: 'playlist-player', style: { position: 'relative', display: 'block', margin: '0px auto', minHeight: '380px' } },
14550
+ React__default.createElement('iframe', {
14551
+ src: 'https://players.brightcove.net/' + accountIDs.brightcove.accountId + '/experience_' + experienceID + '/index.html',
14552
+ allowFullScreen: 'true',
14553
+ webkitallowfullscreen: 'true',
14554
+ mozallowfullscreen: 'true',
14555
+ frameBorder: 'none',
14556
+ scrolling: 'no',
14557
+ style: { border: 'none', top: '0px', right: '0px', bottom: '0px', left: '0px', width: '100%', height: '100%' }
14558
+ })
14559
+ );
14551
14560
  }
14552
14561
  return null;
14553
14562
  }
@@ -14590,7 +14599,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
14590
14599
  var nodes = _ref.nodes,
14591
14600
  client = _ref.client;
14592
14601
 
14593
- var router$$1 = router.useRouter();
14602
+ var router = Router.useRouter();
14594
14603
  //state
14595
14604
 
14596
14605
  var _useState = React.useState(''),
@@ -14610,8 +14619,8 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
14610
14619
  //variables
14611
14620
 
14612
14621
 
14613
- var get2 = router$$1 && router$$1.asPath ? router$$1.asPath.split('/')[1] : '';
14614
- var get3 = router$$1 && router$$1.asPath ? router$$1.asPath.split('/')[2].split('?')[0] : '';
14622
+ var get2 = router && router.asPath ? router.asPath.split('/')[1] : '';
14623
+ var get3 = router && router.asPath ? router.asPath.split('/')[2].split('?')[0] : '';
14615
14624
 
14616
14625
  // Once component mounts, set the variables
14617
14626
  React.useEffect(function () {
@@ -15226,10 +15235,10 @@ var urlFor$3 = function urlFor(source, builder) {
15226
15235
  return builder.image(source);
15227
15236
  };
15228
15237
 
15229
- var onChangeSlide$1 = function onChangeSlide(selectedIndex, pageview, setCarouselIndex, asPath) {
15230
- setCarouselIndex(selectedIndex);
15231
- lib_3.refresh();
15232
- if (pageview) pageview(asPath);
15238
+ var onChangeSlide$1 = function onChangeSlide(selectedIndex, router) {
15239
+ var pageNumber = selectedIndex + 1;
15240
+ var href = '/view/' + router.query.url + '/?page=' + pageNumber;
15241
+ Router__default.push(router.pathname, pageNumber > 1 ? href : '/view/' + router.query.url, { shallow: true });
15233
15242
  };
15234
15243
 
15235
15244
  var Slideshow$1 = function Slideshow(_ref) {
@@ -15238,8 +15247,7 @@ var Slideshow$1 = function Slideshow(_ref) {
15238
15247
  pageview = _ref.pageview,
15239
15248
  serializerArguments = _ref.serializerArguments;
15240
15249
 
15241
- console.log(slides);
15242
- var router$$1 = router.useRouter();
15250
+ var router = Router.useRouter();
15243
15251
 
15244
15252
  var _useState = React.useState(0),
15245
15253
  _useState2 = slicedToArray(_useState, 2),
@@ -15248,14 +15256,29 @@ var Slideshow$1 = function Slideshow(_ref) {
15248
15256
 
15249
15257
  var builder = imageUrlBuilder(client);
15250
15258
 
15259
+ React.useEffect(function () {
15260
+ var itemArr = router.asPath.split('?page=');
15261
+ var pageNumber = parseInt(itemArr[1]);
15262
+ if (!pageNumber || isNaN(pageNumber) || pageNumber > slides.length) {
15263
+ setCarouselIndex(0);
15264
+ } else {
15265
+ setCarouselIndex(parseInt(itemArr[1]) - 1);
15266
+ }
15267
+ }, [router]);
15268
+
15269
+ React.useEffect(function () {
15270
+ lib_3.refresh();
15271
+ if (pageview) pageview(router.asPath);
15272
+ }, [router]);
15273
+
15251
15274
  return React__default.createElement(
15252
15275
  'div',
15253
15276
  { className: 'mt-3 mb-3' },
15254
15277
  React__default.createElement(
15255
15278
  reactBootstrap.Carousel,
15256
15279
  { activeIndex: carouselIndex, onSelect: function onSelect(selectedIndex, e) {
15257
- return onChangeSlide$1(selectedIndex, pageview, setCarouselIndex, router$$1.asPath);
15258
- }, indicators: false },
15280
+ return onChangeSlide$1(selectedIndex, router);
15281
+ } },
15259
15282
  slides && slides.map(function (slide) {
15260
15283
  if (slide.slideshowImage && slide.slideshowImage.asset) {
15261
15284
  return React__default.createElement(