@mjhls/mjh-framework 1.0.105 → 1.0.108

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
@@ -9901,6 +9901,48 @@ var GridContent = function (_React$Component) {
9901
9901
  }
9902
9902
  }
9903
9903
  }
9904
+ }, _this.renderAuthor = function (authorDetail, index$$1, length) {
9905
+ var _id = authorDetail._id,
9906
+ displayName = authorDetail.displayName,
9907
+ url = authorDetail.url;
9908
+
9909
+ if (displayName && url && url.current) {
9910
+ return React__default.createElement(
9911
+ 'div',
9912
+ { key: _id },
9913
+ index$$1 === 0 && React__default.createElement(
9914
+ 'span',
9915
+ { className: 'pr-1' },
9916
+ 'By'
9917
+ ),
9918
+ React__default.createElement(
9919
+ Link,
9920
+ { href: '/authors/[url]', as: '/authors/' + url.current },
9921
+ React__default.createElement(
9922
+ 'a',
9923
+ { className: 'text-muted' },
9924
+ displayName,
9925
+ length !== index$$1 + 1 && React__default.createElement('br', null)
9926
+ )
9927
+ )
9928
+ );
9929
+ } else if (displayName) {
9930
+ return React__default.createElement(
9931
+ 'div',
9932
+ { key: _id },
9933
+ index$$1 === 0 && React__default.createElement(
9934
+ 'span',
9935
+ { className: 'pr-1' },
9936
+ 'By'
9937
+ ),
9938
+ React__default.createElement(
9939
+ 'span',
9940
+ { className: 'text-muted' },
9941
+ displayName,
9942
+ length !== index$$1 + 1 && React__default.createElement('br', null)
9943
+ )
9944
+ );
9945
+ }
9904
9946
  }, _this.renderManualPagination = function () {
9905
9947
  var currentPage = _this.state.currentPage;
9906
9948
 
@@ -9939,44 +9981,55 @@ var GridContent = function (_React$Component) {
9939
9981
  Col,
9940
9982
  { key: index$$1, md: 12, lg: lgVar, style: { display: 'flex', flex: '1 0 auto' } },
9941
9983
  React__default.createElement(
9942
- Link,
9943
- { href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
9984
+ Card,
9985
+ { className: 'queue-card', style: { borderTop: '1px solid #EEE' } },
9944
9986
  React__default.createElement(
9945
- 'a',
9946
- null,
9987
+ Row,
9988
+ { style: { flexDirection: 'row' } },
9947
9989
  React__default.createElement(
9948
- Card,
9949
- { className: 'queue-card', style: { borderTop: '1px solid #EEE' } },
9990
+ Col,
9991
+ { md: 12, lg: 4 },
9950
9992
  React__default.createElement(
9951
- Row,
9952
- { style: { flexDirection: 'row' } },
9993
+ Link,
9994
+ { href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
9953
9995
  React__default.createElement(
9954
- Col,
9955
- { md: 12, lg: 4 },
9996
+ 'a',
9997
+ null,
9956
9998
  React__default.createElement(Card.Img, { variant: 'top', src: thumbnailURL })
9957
- ),
9999
+ )
10000
+ )
10001
+ ),
10002
+ React__default.createElement(
10003
+ Col,
10004
+ null,
10005
+ React__default.createElement(
10006
+ Card.Body,
10007
+ { style: { padding: '20px' } },
9958
10008
  React__default.createElement(
9959
- Col,
9960
- null,
10009
+ Link,
10010
+ { href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
9961
10011
  React__default.createElement(
9962
- Card.Body,
9963
- { style: { padding: '20px' } },
10012
+ 'a',
10013
+ null,
9964
10014
  React__default.createElement(
9965
10015
  Card.Title,
9966
10016
  null,
9967
10017
  row.title
9968
- ),
9969
- _this2.props.showPublished && row.published && React__default.createElement(
9970
- Card.Subtitle,
9971
- { style: { marginTop: 0 } },
9972
- moment(row.published).format('MMMM DD, YYYY')
9973
- ),
9974
- React__default.createElement(
9975
- Card.Text,
9976
- null,
9977
- row.summary
9978
10018
  )
9979
10019
  )
10020
+ ),
10021
+ _this2.props.showPublished && row.published && React__default.createElement(
10022
+ Card.Subtitle,
10023
+ { style: { marginTop: 0 } },
10024
+ moment(row.published).format('MMMM DD, YYYY')
10025
+ ),
10026
+ _this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 && row.authorMapping.map(function (authorDetail, index$$1) {
10027
+ return _this2.renderAuthor(authorDetail, index$$1, row.authorMapping.length);
10028
+ }),
10029
+ React__default.createElement(
10030
+ Card.Text,
10031
+ null,
10032
+ row.summary
9980
10033
  )
9981
10034
  )
9982
10035
  )
@@ -10027,18 +10080,21 @@ var GridContent = function (_React$Component) {
10027
10080
  Card.Title,
10028
10081
  null,
10029
10082
  row.title
10030
- ),
10031
- _this2.props.showPublished && row.published && React__default.createElement(
10032
- Card.Subtitle,
10033
- { style: { marginTop: 0 } },
10034
- moment(row.published).format('MMMM DD, YYYY')
10035
- ),
10036
- React__default.createElement(
10037
- Card.Text,
10038
- { className: index$$1 === 0 || index$$1 % 4 === 0 ? '' : 'card-subtext' },
10039
- row.summary
10040
10083
  )
10041
10084
  )
10085
+ ),
10086
+ _this2.props.showPublished && row.published && React__default.createElement(
10087
+ Card.Subtitle,
10088
+ { style: { marginTop: 0 } },
10089
+ moment(row.published).format('MMMM DD, YYYY')
10090
+ ),
10091
+ _this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 && row.authorMapping.map(function (authorDetail, index$$1) {
10092
+ return _this2.renderAuthor(authorDetail, index$$1, row.authorMapping.length);
10093
+ }),
10094
+ React__default.createElement(
10095
+ Card.Text,
10096
+ { className: index$$1 === 0 || index$$1 % 4 === 0 ? '' : 'card-subtext' },
10097
+ row.summary
10042
10098
  )
10043
10099
  )
10044
10100
  )
@@ -11013,29 +11069,51 @@ var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pagevi
11013
11069
  }
11014
11070
  };
11015
11071
 
11016
- var renderAuthor = function renderAuthor(authorName, authorURL, index$$1, length) {
11017
- if (authorName && authorURL) {
11072
+ var renderAuthor = function renderAuthor(authorDetail, index$$1, length) {
11073
+ var _id = authorDetail._id,
11074
+ displayName = authorDetail.displayName,
11075
+ url = authorDetail.url;
11076
+
11077
+ if (displayName && url && url.current) {
11018
11078
  return React__default.createElement(
11019
- Link,
11020
- { href: '/authors/' + authorURL.current, key: index$$1 },
11079
+ 'div',
11080
+ { key: _id },
11081
+ index$$1 === 0 && React__default.createElement(
11082
+ 'span',
11083
+ { className: 'pr-1' },
11084
+ 'By'
11085
+ ),
11021
11086
  React__default.createElement(
11022
- 'a',
11023
- null,
11024
- authorName,
11025
- length !== index$$1 + 1 && ' | '
11087
+ Link,
11088
+ { href: '/authors/[url]', as: '/authors/' + url.current },
11089
+ React__default.createElement(
11090
+ 'a',
11091
+ { className: 'text-muted' },
11092
+ displayName,
11093
+ length !== index$$1 + 1 && React__default.createElement('br', null)
11094
+ )
11026
11095
  )
11027
11096
  );
11028
- } else if (authorName) {
11097
+ } else if (displayName) {
11029
11098
  return React__default.createElement(
11030
- 'span',
11031
- { key: index$$1 },
11032
- authorName,
11033
- length !== index$$1 + 1 && ' | '
11099
+ 'div',
11100
+ { key: _id },
11101
+ index$$1 === 0 && React__default.createElement(
11102
+ 'span',
11103
+ { className: 'pr-1' },
11104
+ 'By'
11105
+ ),
11106
+ React__default.createElement(
11107
+ 'span',
11108
+ { className: 'text-muted' },
11109
+ displayName,
11110
+ length !== index$$1 + 1 && React__default.createElement('br', null)
11111
+ )
11034
11112
  );
11035
11113
  }
11036
11114
  };
11037
11115
 
11038
- var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage) {
11116
+ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor) {
11039
11117
  return React__default.createElement(
11040
11118
  'div',
11041
11119
  null,
@@ -11089,12 +11167,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
11089
11167
  { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
11090
11168
  moment(article.published).format('MMMM DD, YYYY')
11091
11169
  ),
11092
- article.authorDetails && article.authorDetails.length > 0 && article.authorDetails.map(function (authorDetail, index$$1) {
11093
- return React__default.createElement(
11094
- 'div',
11095
- { className: 'card-text d-inline', key: index$$1 },
11096
- renderAuthor(authorDetail.displayName, authorDetail.url, index$$1, article.authorDetails.length)
11097
- );
11170
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index$$1) {
11171
+ return renderAuthor(authorDetail, index$$1, article.authorMapping.length);
11098
11172
  }),
11099
11173
  article.summary && React__default.createElement(
11100
11174
  'p',
@@ -11146,7 +11220,8 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11146
11220
  mapping = props.mapping,
11147
11221
  seoPaginate = props.seoPaginate,
11148
11222
  pageview = props.pageview,
11149
- defaultImage = props.defaultImage;
11223
+ defaultImage = props.defaultImage,
11224
+ showAuthor = props.showAuthor;
11150
11225
  var initialCurrentPage = props.currentPage,
11151
11226
  showPublished = props.showPublished;
11152
11227
 
@@ -11163,9 +11238,8 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11163
11238
  setScrolling = _useState4[1];
11164
11239
 
11165
11240
  var _useState5 = React.useState(params ? params.to : 0),
11166
- _useState6 = slicedToArray(_useState5, 2),
11167
- per = _useState6[0],
11168
- setPer = _useState6[1];
11241
+ _useState6 = slicedToArray(_useState5, 1),
11242
+ per = _useState6[0];
11169
11243
 
11170
11244
  var _useState7 = React.useState(initialCurrentPage || 1),
11171
11245
  _useState8 = slicedToArray(_useState7, 2),
@@ -11205,7 +11279,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11205
11279
  React__default.createElement(
11206
11280
  reactBootstrap.Container,
11207
11281
  null,
11208
- cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage)
11282
+ cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor)
11209
11283
  )
11210
11284
  ),
11211
11285
  React__default.createElement(
@@ -11219,7 +11293,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11219
11293
  React__default.createElement(
11220
11294
  reactBootstrap.Container,
11221
11295
  null,
11222
- cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage)
11296
+ cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor)
11223
11297
  ),
11224
11298
  React__default.createElement(
11225
11299
  'div',
@@ -11265,8 +11339,8 @@ var VideoSeriesListing = function (_React$Component) {
11265
11339
  args[_key] = arguments[_key];
11266
11340
  }
11267
11341
 
11268
- 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.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.state = {
11269
- data: _this.data,
11342
+ 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.dataArr = [_this.data], _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.state = {
11343
+ data: _this.dataArr,
11270
11344
  per: _this.params ? _this.params.to : 2,
11271
11345
  page: _this.props.currentPage || 1,
11272
11346
  from: _this.params ? _this.params.from : 0,
@@ -11314,8 +11388,10 @@ var VideoSeriesListing = function (_React$Component) {
11314
11388
 
11315
11389
  _this.setState(function () {
11316
11390
  if (dataArr.length > 0) {
11391
+ var newDataArr = _this.state.data;
11392
+ newDataArr.push(dataArr);
11317
11393
  return {
11318
- data: [].concat(toConsumableArray(data), toConsumableArray(dataArr)),
11394
+ data: newDataArr,
11319
11395
  scrolling: true
11320
11396
  };
11321
11397
  } else {
@@ -11400,44 +11476,72 @@ var VideoSeriesListing = function (_React$Component) {
11400
11476
  'Next >>'
11401
11477
  )
11402
11478
  );
11479
+ }, _this.renderSeries = function (seriesData) {
11480
+ var itemCounter = 0;
11481
+
11482
+ return React__default.createElement(
11483
+ 'div',
11484
+ null,
11485
+ seriesData && seriesData.map(function (docSeries, index$$1) {
11486
+ docSeries.body[0].videos.map(function (singleVideo, indexInner) {
11487
+ singleVideo.link = '/view/' + docSeries.url.current + '?seriesVid=' + (indexInner + 1);
11488
+ });
11489
+ return React__default.createElement(
11490
+ 'div',
11491
+ { key: index$$1, counter: itemCounter++ },
11492
+ React__default.createElement(
11493
+ 'h4',
11494
+ { className: 'video-title-banner', style: { fontWeight: 'bold', color: 'var(--primary)', padding: '.25rem 0', borderBottom: '2px solid var(--gold)' } },
11495
+ React__default.createElement(
11496
+ Link,
11497
+ { href: '/' + _this.props.page + '/' + docSeries.url.current },
11498
+ React__default.createElement(
11499
+ 'a',
11500
+ null,
11501
+ docSeries.title,
11502
+ React__default.createElement(
11503
+ 'span',
11504
+ { style: { fontSize: '.9rem', color: 'grey', marginLeft: '1rem' } },
11505
+ 'View Topic'
11506
+ )
11507
+ )
11508
+ )
11509
+ ),
11510
+ React__default.createElement(YoutubeGroup, { key: index$$1, dataset: docSeries.body[0].videos })
11511
+ );
11512
+ })
11513
+ );
11403
11514
  }, _temp), possibleConstructorReturn(_this, _ret);
11404
11515
  }
11405
11516
 
11406
11517
  createClass(VideoSeriesListing, [{
11407
11518
  key: 'render',
11408
11519
  value: function render() {
11520
+ var _this2 = this;
11521
+
11409
11522
  return React__default.createElement(
11410
11523
  InfiniteScroll,
11411
11524
  { dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling, scrollThreshold: 0.9 },
11412
11525
  React__default.createElement(
11413
11526
  Container,
11414
11527
  null,
11415
- this.state.data && this.state.data.map(function (docSeries, index$$1) {
11416
- docSeries.body[0].videos && docSeries.body[0].videos.map(function (singleVideo, indexInner) {
11417
- singleVideo.link = '/view/' + docSeries.url.current + '?seriesVid=' + (indexInner + 1);
11418
- });
11528
+ this.state.data && this.state.data.map(function (series, index$$1) {
11529
+ var page = series[0].pageNumber !== 1 ? series[0].pageNumber : index$$1 + 1;
11530
+
11419
11531
  return React__default.createElement(
11420
- 'div',
11421
- null,
11532
+ VisibilitySensor,
11533
+ {
11534
+ partialVisibility: true,
11535
+ offset: { bottom: 400, top: 200 },
11536
+ key: index$$1,
11537
+ onChange: function onChange(isVisible) {
11538
+ isVisible && _this2.changePageNumber(page);
11539
+ } },
11422
11540
  React__default.createElement(
11423
- 'h4',
11424
- { className: 'video-title-banner', style: { fontWeight: 'bold', color: 'var(--primary)', padding: '.25rem 0', borderBottom: '2px solid var(--gold)' } },
11425
- React__default.createElement(
11426
- Link,
11427
- { href: '/case-based-peer-perspectives/' + docSeries.url.current },
11428
- React__default.createElement(
11429
- 'a',
11430
- null,
11431
- docSeries.title,
11432
- React__default.createElement(
11433
- 'span',
11434
- { style: { fontSize: '.9rem', color: 'grey', marginLeft: '1rem' } },
11435
- 'View Topic'
11436
- )
11437
- )
11438
- )
11439
- ),
11440
- React__default.createElement(YoutubeGroup, { key: index$$1, dataset: docSeries.body[0].videos })
11541
+ 'div',
11542
+ null,
11543
+ _this2.renderSeries(series)
11544
+ )
11441
11545
  );
11442
11546
  })
11443
11547
  )
@@ -11795,6 +11899,10 @@ function IconBase(props) {
11795
11899
  }
11796
11900
 
11797
11901
  // THIS FILE IS AUTO GENERATED
11902
+ var IoIosHome = function (props) {
11903
+ return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M258.5 104.1c-1.5-1.2-3.5-1.2-5 0l-156 124.8c-.9.8-1.5 1.9-1.5 3.1v230c0 1.1.9 2 2 2h108c1.1 0 2-.9 2-2V322c0-1.1.9-2 2-2h92c1.1 0 2 .9 2 2v140c0 1.1.9 2 2 2h108c1.1 0 2-.9 2-2V232c0-1.2-.6-2.4-1.5-3.1l-156-124.8z"}},{"tag":"path","attr":{"d":"M458.7 204.2l-189-151.4C265.9 49.7 261 48 256 48s-9.9 1.7-13.7 4.8L160 119.7V77.5c0-1.1-.9-2-2-2H98c-1.1 0-2 .9-2 2v92.2l-42.7 35.1c-3.1 2.5-5.1 6.2-5.3 10.2-.2 4 1.3 7.9 4.1 10.7 2.6 2.6 6.1 4.1 9.9 4.1 3.2 0 6.3-1.1 8.8-3.1l183.9-148c.5-.4.9-.4 1.3-.4s.8.1 1.3.4l183.9 147.4c2.5 2 5.6 3.1 8.8 3.1 3.7 0 7.2-1.4 9.9-4.1 2.9-2.8 4.4-6.7 4.2-10.7-.3-4-2.2-7.7-5.4-10.2z"}}]})(props);
11904
+ };
11905
+ IoIosHome.displayName = "IoIosHome";
11798
11906
  var IoMdArrowDropdown = function (props) {
11799
11907
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M128 192l128 128 128-128z"}}]})(props);
11800
11908
  };
@@ -12086,6 +12194,31 @@ var NavMagazine = function NavMagazine(props) {
12086
12194
  subNav = props.subNav,
12087
12195
  website = props.website;
12088
12196
 
12197
+ var navRef = React.useRef(null);
12198
+
12199
+ var _useState = React.useState(false),
12200
+ _useState2 = slicedToArray(_useState, 2),
12201
+ isSticky = _useState2[0],
12202
+ setIsSticky = _useState2[1];
12203
+
12204
+ React.useEffect(function () {
12205
+ document.addEventListener('scroll', trackScrolling);
12206
+ return function () {
12207
+ document.removeEventListener('scroll', trackScrolling);
12208
+ };
12209
+ // eslint-disable-next-line react-hooks/exhaustive-deps
12210
+ }, []);
12211
+
12212
+ var trackScrolling = function trackScrolling() {
12213
+ var offsetTop = navRef.current.getBoundingClientRect().top;
12214
+
12215
+ if (offsetTop === 0) {
12216
+ setIsSticky(true);
12217
+ } else {
12218
+ setIsSticky(false);
12219
+ }
12220
+ };
12221
+
12089
12222
  return React__default.createElement(
12090
12223
  React__default.Fragment,
12091
12224
  null,
@@ -12118,7 +12251,7 @@ var NavMagazine = function NavMagazine(props) {
12118
12251
  ),
12119
12252
  React__default.createElement(
12120
12253
  Navbar,
12121
- { className: 'bottom-nav', variant: 'dark', expand: 'lg', bg: 'primary', sticky: 'top' },
12254
+ { className: 'bottom-nav', variant: 'dark', expand: 'lg', bg: 'primary', sticky: 'top', ref: navRef },
12122
12255
  React__default.createElement(
12123
12256
  Container,
12124
12257
  { className: 'mobile-nav' },
@@ -12126,6 +12259,15 @@ var NavMagazine = function NavMagazine(props) {
12126
12259
  React__default.createElement(
12127
12260
  Navbar.Collapse,
12128
12261
  { id: 'basic-navbar-nav' },
12262
+ isSticky && React__default.createElement(
12263
+ Link,
12264
+ { href: '/' },
12265
+ React__default.createElement(
12266
+ 'a',
12267
+ null,
12268
+ React__default.createElement(IoIosHome, { size: 20, className: 'sticky-home', color: '#fff' })
12269
+ )
12270
+ ),
12129
12271
  React__default.createElement(
12130
12272
  Nav,
12131
12273
  { className: 'mr-auto' },
@@ -12222,7 +12364,7 @@ var NavMagazine = function NavMagazine(props) {
12222
12364
  React__default.createElement(
12223
12365
  'style',
12224
12366
  { jsx: true },
12225
- '\n @media screen and (max-width: 991px) {\n .dropdown-menu {\n max-height: 315px;\n overflow: auto;\n }\n ::-webkit-scrollbar {\n width: 10px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(214, 214, 214, 0.8);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n .navbar-expand-lg .show#basic-navbar-sub {\n display: block;\n }\n .navbar .mobile-nav .navbar-collapse.show {\n padding-bottom: 20px;\n border-bottom: 0.5px solid white;\n margin-bottom: 15px;\n }\n .navbar .mobile-nav .navbar-collapse .form-inline {\n margin: 5px 0px;\n }\n .navbar .mobile-nav .navbar-collapse:last-child {\n border-bottom: none;\n margin-bottom: 0px;\n padding-bottom: 0px;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer ul {\n list-style-type: none;\n padding: inherit;\n margin-bottom: 0rem;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer .nav-link {\n text-transform: capitalize !important;\n font-weight: 300;\n }\n .navbar .mobile-nav .dropdown-item:focus {\n background-color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: white;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: inherit;\n border: none;\n }\n }\n @media screen and (min-width: 992px) {\n #basic-navbar-sub {\n display: none !important;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: white;\n border: 1 px solid #708090;\n }\n }\n '
12367
+ '\n .sticky-home {\n position: relative;\n top: -3px;\n left: -6px;\n cursor: pointer;\n }\n @media screen and (max-width: 991px) {\n .sticky-home {\n display: none;\n }\n .dropdown-menu {\n max-height: 315px;\n overflow: auto;\n }\n ::-webkit-scrollbar {\n width: 10px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(214, 214, 214, 0.8);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n .navbar-expand-lg .show#basic-navbar-sub {\n display: block;\n }\n .navbar .mobile-nav .navbar-collapse.show {\n padding-bottom: 20px;\n border-bottom: 0.5px solid white;\n margin-bottom: 15px;\n }\n .navbar .mobile-nav .navbar-collapse .form-inline {\n display: none;\n }\n .navbar .mobile-nav .navbar-collapse {\n margin-top: 15px;\n }\n .navbar .mobile-nav .navbar-collapse:last-child {\n border-bottom: none;\n margin-bottom: 0px;\n padding-bottom: 0px;\n margin-top: 0px;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer ul {\n list-style-type: none;\n padding: inherit;\n margin-bottom: 0rem;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer .nav-link {\n text-transform: capitalize !important;\n font-weight: 300;\n }\n .navbar .mobile-nav .dropdown-item:focus {\n background-color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: white;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: inherit;\n border: none;\n }\n .navbar .mobile-nav .dropdown-menu.show {\n max-height: 100px;\n }\n }\n @media screen and (min-width: 992px) {\n #basic-navbar-sub {\n display: none !important;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: white;\n border: 1 px solid #708090;\n }\n }\n .mobile-nav .navbar-toggler {\n width: 100%;\n }\n .mobile-nav .navbar-toggler-icon {\n margin-top: 4px;\n float: left;\n }\n .mobile-nav .form-inline {\n float: right;\n }\n .mobile-nav .form-inline .mobile-search {\n width: 69%;\n }\n '
12226
12368
  )
12227
12369
  );
12228
12370
  };
@@ -13612,26 +13754,38 @@ var AD300x250x600 = function AD300x250x600(_ref) {
13612
13754
  });
13613
13755
  };
13614
13756
 
13757
+ var urlFor$1 = function urlFor(source, client) {
13758
+ var builder = imageUrlBuilder(client);
13759
+ return builder.image(source);
13760
+ };
13761
+
13615
13762
  var FigureComponent = function FigureComponent(_ref) {
13616
13763
  var node$$1 = _ref.node,
13617
13764
  client = _ref.client;
13765
+
13766
+ var imgElement = React.useRef(null);
13767
+
13768
+ var _useState = React.useState(null),
13769
+ _useState2 = slicedToArray(_useState, 2),
13770
+ captionWidth = _useState2[0],
13771
+ setcaptionWidth = _useState2[1];
13772
+
13773
+ var _useState3 = React.useState(''),
13774
+ _useState4 = slicedToArray(_useState3, 2),
13775
+ imgFloat = _useState4[0],
13776
+ setimgFloat = _useState4[1];
13777
+
13618
13778
  var caption = node$$1.caption,
13619
- asset = node$$1.asset,
13620
13779
  alt = node$$1.alt,
13621
13780
  blank = node$$1.blank,
13622
13781
  link = node$$1.link,
13623
- _node$widthP = node$$1.widthP,
13624
- widthP = _node$widthP === undefined ? '100' : _node$widthP,
13782
+ widthP = node$$1.widthP,
13625
13783
  _node$alignment = node$$1.alignment,
13626
13784
  alignment = _node$alignment === undefined ? 'center' : _node$alignment;
13627
13785
 
13628
- var builder = imageUrlBuilder(client);
13629
13786
 
13630
- var urlFor = function urlFor(source) {
13631
- return builder.image(source);
13632
- };
13633
- var imgWidth = widthP + '%';
13634
- var imgFloat = alignment.toLowerCase() === 'center' ? 'none' : alignment.toLowerCase();
13787
+ var imgWidth = widthP ? widthP + '%' : 'auto';
13788
+
13635
13789
  var figureMargin = void 0;
13636
13790
  if (imgFloat === 'none') {
13637
13791
  figureMargin = '0 auto 1rem';
@@ -13642,32 +13796,47 @@ var FigureComponent = function FigureComponent(_ref) {
13642
13796
  if (imgFloat === 'right') {
13643
13797
  figureMargin = '0 10% 1rem 1rem';
13644
13798
  }
13799
+
13800
+ var loadImg = function loadImg() {
13801
+ setcaptionWidth(imgElement.current.naturalWidth);
13802
+ };
13803
+
13804
+ React.useEffect(function () {
13805
+ var screenWidth = window.innerWidth;
13806
+ if (screenWidth > 1000) {
13807
+ var align = alignment.toLowerCase() === 'center' ? 'none' : alignment.toLowerCase();
13808
+ setimgFloat(align);
13809
+ loadImg();
13810
+ }
13811
+ // eslint-disable-next-line react-hooks/exhaustive-deps
13812
+ }, []);
13813
+
13645
13814
  return React__default.createElement(
13646
13815
  reactBootstrap.Figure,
13647
- { className: 'd-block text-center mb-3', style: { width: imgWidth, float: imgFloat, margin: figureMargin } },
13816
+ { className: 'd-block text-center mb-3', style: { width: imgWidth, clear: 'both', float: imgFloat, margin: figureMargin } },
13648
13817
  link ? React__default.createElement(
13649
13818
  'a',
13650
13819
  { href: link, target: blank ? '_blank' : '_self' },
13651
- React__default.createElement(reactBootstrap.Figure.Image, { src: urlFor(node$$1).url(), alt: alt && alt }),
13820
+ React__default.createElement(reactBootstrap.Figure.Image, { ref: imgElement, onLoad: loadImg, src: urlFor$1(node$$1, client).url(), alt: alt && alt }),
13652
13821
  caption && React__default.createElement(
13653
13822
  reactBootstrap.Figure.Caption,
13654
- null,
13823
+ { style: { width: captionWidth } },
13655
13824
  caption
13656
13825
  )
13657
13826
  ) : React__default.createElement(
13658
13827
  React__default.Fragment,
13659
13828
  null,
13660
- React__default.createElement(reactBootstrap.Figure.Image, { src: urlFor(node$$1).url(), alt: alt && alt }),
13829
+ React__default.createElement(reactBootstrap.Figure.Image, { ref: imgElement, onLoad: loadImg, src: urlFor$1(node$$1, client).url(), alt: alt && alt }),
13661
13830
  caption && React__default.createElement(
13662
13831
  reactBootstrap.Figure.Caption,
13663
- null,
13832
+ { style: { width: captionWidth } },
13664
13833
  caption
13665
13834
  )
13666
13835
  )
13667
13836
  );
13668
13837
  };
13669
13838
 
13670
- var urlFor$1 = function urlFor(source, builder) {
13839
+ var urlFor$2 = function urlFor(source, builder) {
13671
13840
  return builder.image(source);
13672
13841
  };
13673
13842
 
@@ -13703,7 +13872,7 @@ var Slideshow = function Slideshow(_ref) {
13703
13872
  return React__default.createElement(
13704
13873
  reactBootstrap.Carousel.Item,
13705
13874
  { key: slide._key },
13706
- React__default.createElement('img', { src: slide.asset && urlFor$1(slide.asset, builder).url(), alt: slide.alt && slide.alt, style: { width: '100%' } }),
13875
+ React__default.createElement('img', { src: slide.asset && urlFor$2(slide.asset, builder).url(), alt: slide.alt && slide.alt, style: { width: '100%' } }),
13707
13876
  slide.caption && React__default.createElement(
13708
13877
  'p',
13709
13878
  { className: 'p-2' },
@@ -19593,7 +19762,9 @@ var Video = function Video(_ref) {
19593
19762
  var source = node.source,
19594
19763
  videoID = node.videoID;
19595
19764
 
19596
- if (source === 'brightcove' && accountIDs.brightcove) return React__default.createElement(ReactPlayerLoader, { accountId: accountIDs.brightcove, videoId: videoID, attrs: { className: 'brightcove' } });
19765
+ if (source === 'brightcove' && accountIDs.brightcove) {
19766
+ return React__default.createElement(ReactPlayerLoader, { accountId: accountIDs.brightcove.accountId, videoId: videoID, playerId: accountIDs.brightcove.playerId, attrs: { className: 'brightcove' } });
19767
+ }
19597
19768
  // TODO - add players for other video types
19598
19769
  return null;
19599
19770
  };
@@ -19814,7 +19985,7 @@ var Poll = function Poll(_ref) {
19814
19985
  response = node.response;
19815
19986
 
19816
19987
 
19817
- var choicesTotolCount = choices && choices.reduce(function (acc, choice) {
19988
+ var choicesTotalCount = choices && choices.reduce(function (acc, choice) {
19818
19989
  acc = acc + parseInt(choice.choiceCount);
19819
19990
  return acc;
19820
19991
  }, 0);
@@ -19855,7 +20026,7 @@ var Poll = function Poll(_ref) {
19855
20026
  'div',
19856
20027
  { className: 'progress-container' },
19857
20028
  showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
19858
- var percentage = Math.floor(choice.choiceCount * 100 / choicesTotolCount);
20029
+ var percentage = choicesTotalCount && choicesTotalCount > 0 ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0;
19859
20030
  return React__default.createElement(
19860
20031
  'div',
19861
20032
  { key: choice._key, className: 'mb-3' },
@@ -19864,16 +20035,24 @@ var Poll = function Poll(_ref) {
19864
20035
  null,
19865
20036
  choice.choiceText
19866
20037
  ),
19867
- React__default.createElement(reactBootstrap.ProgressBar, { now: percentage, label: percentage + '%' }),
20038
+ React__default.createElement(reactBootstrap.ProgressBar, { now: percentage }),
19868
20039
  React__default.createElement(
19869
20040
  'span',
19870
20041
  { className: 'float-right' },
20042
+ percentage,
20043
+ '% (',
19871
20044
  choice.choiceCount,
19872
- ' Votes'
20045
+ ' Votes)'
19873
20046
  )
19874
20047
  );
19875
20048
  })
19876
20049
  ),
20050
+ showAnswer && React__default.createElement(
20051
+ 'h4',
20052
+ { className: 'text-center small p-3' },
20053
+ 'Total Votes: ',
20054
+ choicesTotalCount
20055
+ ),
19877
20056
  showAnswer && response && React__default.createElement(BlockContent, { blocks: response }),
19878
20057
  React__default.createElement(
19879
20058
  'style',
@@ -19995,7 +20174,7 @@ var Feature = function Feature(props) {
19995
20174
  null,
19996
20175
  React__default.createElement(
19997
20176
  Carousel,
19998
- null,
20177
+ { touch: true },
19999
20178
  dataset.map(function (feature, index) {
20000
20179
  var feature_title = feature.feature_title,
20001
20180
  feature_body = feature.feature_body,
@@ -20079,7 +20258,211 @@ var Breadcrumbs = function Breadcrumbs() {
20079
20258
  );
20080
20259
  };
20081
20260
 
20082
- var urlFor$2 = function urlFor(source, client) {
20261
+ var js_cookie = createCommonjsModule(function (module, exports) {
20262
+ (function (factory) {
20263
+ var registeredInModuleLoader;
20264
+ {
20265
+ module.exports = factory();
20266
+ registeredInModuleLoader = true;
20267
+ }
20268
+ if (!registeredInModuleLoader) {
20269
+ var OldCookies = window.Cookies;
20270
+ var api = window.Cookies = factory();
20271
+ api.noConflict = function () {
20272
+ window.Cookies = OldCookies;
20273
+ return api;
20274
+ };
20275
+ }
20276
+ }(function () {
20277
+ function extend () {
20278
+ var i = 0;
20279
+ var result = {};
20280
+ for (; i < arguments.length; i++) {
20281
+ var attributes = arguments[ i ];
20282
+ for (var key in attributes) {
20283
+ result[key] = attributes[key];
20284
+ }
20285
+ }
20286
+ return result;
20287
+ }
20288
+
20289
+ function decode (s) {
20290
+ return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
20291
+ }
20292
+
20293
+ function init (converter) {
20294
+ function api() {}
20295
+
20296
+ function set (key, value, attributes) {
20297
+ if (typeof document === 'undefined') {
20298
+ return;
20299
+ }
20300
+
20301
+ attributes = extend({
20302
+ path: '/'
20303
+ }, api.defaults, attributes);
20304
+
20305
+ if (typeof attributes.expires === 'number') {
20306
+ attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
20307
+ }
20308
+
20309
+ // We're using "expires" because "max-age" is not supported by IE
20310
+ attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
20311
+
20312
+ try {
20313
+ var result = JSON.stringify(value);
20314
+ if (/^[\{\[]/.test(result)) {
20315
+ value = result;
20316
+ }
20317
+ } catch (e) {}
20318
+
20319
+ value = converter.write ?
20320
+ converter.write(value, key) :
20321
+ encodeURIComponent(String(value))
20322
+ .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
20323
+
20324
+ key = encodeURIComponent(String(key))
20325
+ .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
20326
+ .replace(/[\(\)]/g, escape);
20327
+
20328
+ var stringifiedAttributes = '';
20329
+ for (var attributeName in attributes) {
20330
+ if (!attributes[attributeName]) {
20331
+ continue;
20332
+ }
20333
+ stringifiedAttributes += '; ' + attributeName;
20334
+ if (attributes[attributeName] === true) {
20335
+ continue;
20336
+ }
20337
+
20338
+ // Considers RFC 6265 section 5.2:
20339
+ // ...
20340
+ // 3. If the remaining unparsed-attributes contains a %x3B (";")
20341
+ // character:
20342
+ // Consume the characters of the unparsed-attributes up to,
20343
+ // not including, the first %x3B (";") character.
20344
+ // ...
20345
+ stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
20346
+ }
20347
+
20348
+ return (document.cookie = key + '=' + value + stringifiedAttributes);
20349
+ }
20350
+
20351
+ function get (key, json) {
20352
+ if (typeof document === 'undefined') {
20353
+ return;
20354
+ }
20355
+
20356
+ var jar = {};
20357
+ // To prevent the for loop in the first place assign an empty array
20358
+ // in case there are no cookies at all.
20359
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
20360
+ var i = 0;
20361
+
20362
+ for (; i < cookies.length; i++) {
20363
+ var parts = cookies[i].split('=');
20364
+ var cookie = parts.slice(1).join('=');
20365
+
20366
+ if (!json && cookie.charAt(0) === '"') {
20367
+ cookie = cookie.slice(1, -1);
20368
+ }
20369
+
20370
+ try {
20371
+ var name = decode(parts[0]);
20372
+ cookie = (converter.read || converter)(cookie, name) ||
20373
+ decode(cookie);
20374
+
20375
+ if (json) {
20376
+ try {
20377
+ cookie = JSON.parse(cookie);
20378
+ } catch (e) {}
20379
+ }
20380
+
20381
+ jar[name] = cookie;
20382
+
20383
+ if (key === name) {
20384
+ break;
20385
+ }
20386
+ } catch (e) {}
20387
+ }
20388
+
20389
+ return key ? jar[key] : jar;
20390
+ }
20391
+
20392
+ api.set = set;
20393
+ api.get = function (key) {
20394
+ return get(key, false /* read as raw */);
20395
+ };
20396
+ api.getJSON = function (key) {
20397
+ return get(key, true /* read as json */);
20398
+ };
20399
+ api.remove = function (key, attributes) {
20400
+ set(key, '', extend(attributes, {
20401
+ expires: -1
20402
+ }));
20403
+ };
20404
+
20405
+ api.defaults = {};
20406
+
20407
+ api.withConverter = init;
20408
+
20409
+ return api;
20410
+ }
20411
+
20412
+ return init(function () {});
20413
+ }));
20414
+ });
20415
+
20416
+ var SetCookie = function SetCookie(key, value) {
20417
+ js_cookie.set(key, value, { expires: 1, sameSite: 'none', secure: true });
20418
+ };
20419
+
20420
+ var BreadcrumbsExtended = function BreadcrumbsExtended(_ref) {
20421
+ var childLinks = _ref.childLinks,
20422
+ parentTaxonomy = _ref.parentTaxonomy;
20423
+
20424
+ if (childLinks && childLinks.length > 0) {
20425
+ return React__default.createElement(
20426
+ Breadcrumb,
20427
+ null,
20428
+ childLinks.map(function (item, index) {
20429
+ return React__default.createElement(
20430
+ Breadcrumb.Item,
20431
+ { href: '/' + item.url, key: index },
20432
+ item.name
20433
+ );
20434
+ }),
20435
+ React__default.createElement(
20436
+ 'style',
20437
+ { jsx: true },
20438
+ '\n .breadcrumb {\n background: transparent;\n border: none;\n padding-left: 0.25rem;\n }\n\n .breadcrumb-item + .breadcrumb-item::before {\n content: \'|\';\n }\n\n .breadcrumb .breadcrumb-item a {\n color: var(--primary);\n font-size: 12px;\n }\n '
20439
+ )
20440
+ );
20441
+ } else if (parentTaxonomy.identifier && parentTaxonomy.name) {
20442
+ return React__default.createElement(
20443
+ Breadcrumb,
20444
+ null,
20445
+ React__default.createElement(
20446
+ Breadcrumb.Item,
20447
+ { href: '/' },
20448
+ 'home'
20449
+ ),
20450
+ React__default.createElement(
20451
+ Breadcrumb.Item,
20452
+ { href: '/' + parentTaxonomy.identifier },
20453
+ parentTaxonomy.name
20454
+ ),
20455
+ React__default.createElement(
20456
+ 'style',
20457
+ { jsx: true },
20458
+ '\n ol.breadcrumb {\n background: transparent;\n padding-left: 0.25rem;\n }\n '
20459
+ )
20460
+ );
20461
+ }
20462
+ return null;
20463
+ };
20464
+
20465
+ var urlFor$3 = function urlFor(source, client) {
20083
20466
  var builder = imageUrlBuilder(client);
20084
20467
  return builder.image(source);
20085
20468
  };
@@ -20106,7 +20489,7 @@ var Hero = function Hero(_ref) {
20106
20489
  { className: 'h4' },
20107
20490
  title
20108
20491
  ),
20109
- thumbnail && React__default.createElement(reactBootstrap.Card.Img, { src: urlFor$2(thumbnail, client).url() }),
20492
+ thumbnail && React__default.createElement(reactBootstrap.Card.Img, { src: urlFor$3(thumbnail, client).url() }),
20110
20493
  summary && React__default.createElement(
20111
20494
  reactBootstrap.Card.Footer,
20112
20495
  { className: 'h6' },
@@ -20146,5 +20529,7 @@ exports.getSerializers = getSerializers$1;
20146
20529
  exports.Search = Search;
20147
20530
  exports.Feature = Feature;
20148
20531
  exports.Breadcrumbs = Breadcrumbs;
20532
+ exports.SetCookie = SetCookie;
20533
+ exports.BreadcrumbsExtended = BreadcrumbsExtended;
20149
20534
  exports.Hero = Hero;
20150
20535
  //# sourceMappingURL=index.js.map