@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.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import React__default, { Component, useState, useEffect, useRef, createContext, createElement } from 'react';
1
+ import React__default, { Component, useState, useEffect, useRef, createElement, createContext } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import reactDom from 'react-dom';
4
4
  import Container from 'react-bootstrap/Container';
@@ -8,7 +8,7 @@ import Card from 'react-bootstrap/Card';
8
8
  import Link from 'next/link';
9
9
  import { withRouter, useRouter } from 'next/router';
10
10
  import Media from 'react-bootstrap/Media';
11
- import { Media as Media$1, Card as Card$1, Container as Container$1, Dropdown, Figure, Carousel, Table, Button as Button$1, ProgressBar } from 'react-bootstrap';
11
+ import { Media as Media$1, Container as Container$1, Dropdown, Figure, Carousel, Table, Button as Button$1, ProgressBar, Card as Card$1 } from 'react-bootstrap';
12
12
  import ListGroup from 'react-bootstrap/ListGroup';
13
13
  import Head from 'next/head';
14
14
  import Accordion from 'react-bootstrap/Accordion';
@@ -9894,6 +9894,48 @@ var GridContent = function (_React$Component) {
9894
9894
  }
9895
9895
  }
9896
9896
  }
9897
+ }, _this.renderAuthor = function (authorDetail, index$$1, length) {
9898
+ var _id = authorDetail._id,
9899
+ displayName = authorDetail.displayName,
9900
+ url = authorDetail.url;
9901
+
9902
+ if (displayName && url && url.current) {
9903
+ return React__default.createElement(
9904
+ 'div',
9905
+ { key: _id },
9906
+ index$$1 === 0 && React__default.createElement(
9907
+ 'span',
9908
+ { className: 'pr-1' },
9909
+ 'By'
9910
+ ),
9911
+ React__default.createElement(
9912
+ Link,
9913
+ { href: '/authors/[url]', as: '/authors/' + url.current },
9914
+ React__default.createElement(
9915
+ 'a',
9916
+ { className: 'text-muted' },
9917
+ displayName,
9918
+ length !== index$$1 + 1 && React__default.createElement('br', null)
9919
+ )
9920
+ )
9921
+ );
9922
+ } else if (displayName) {
9923
+ return React__default.createElement(
9924
+ 'div',
9925
+ { key: _id },
9926
+ index$$1 === 0 && React__default.createElement(
9927
+ 'span',
9928
+ { className: 'pr-1' },
9929
+ 'By'
9930
+ ),
9931
+ React__default.createElement(
9932
+ 'span',
9933
+ { className: 'text-muted' },
9934
+ displayName,
9935
+ length !== index$$1 + 1 && React__default.createElement('br', null)
9936
+ )
9937
+ );
9938
+ }
9897
9939
  }, _this.renderManualPagination = function () {
9898
9940
  var currentPage = _this.state.currentPage;
9899
9941
 
@@ -9932,44 +9974,55 @@ var GridContent = function (_React$Component) {
9932
9974
  Col,
9933
9975
  { key: index$$1, md: 12, lg: lgVar, style: { display: 'flex', flex: '1 0 auto' } },
9934
9976
  React__default.createElement(
9935
- Link,
9936
- { href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
9977
+ Card,
9978
+ { className: 'queue-card', style: { borderTop: '1px solid #EEE' } },
9937
9979
  React__default.createElement(
9938
- 'a',
9939
- null,
9980
+ Row,
9981
+ { style: { flexDirection: 'row' } },
9940
9982
  React__default.createElement(
9941
- Card,
9942
- { className: 'queue-card', style: { borderTop: '1px solid #EEE' } },
9983
+ Col,
9984
+ { md: 12, lg: 4 },
9943
9985
  React__default.createElement(
9944
- Row,
9945
- { style: { flexDirection: 'row' } },
9986
+ Link,
9987
+ { href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
9946
9988
  React__default.createElement(
9947
- Col,
9948
- { md: 12, lg: 4 },
9989
+ 'a',
9990
+ null,
9949
9991
  React__default.createElement(Card.Img, { variant: 'top', src: thumbnailURL })
9950
- ),
9992
+ )
9993
+ )
9994
+ ),
9995
+ React__default.createElement(
9996
+ Col,
9997
+ null,
9998
+ React__default.createElement(
9999
+ Card.Body,
10000
+ { style: { padding: '20px' } },
9951
10001
  React__default.createElement(
9952
- Col,
9953
- null,
10002
+ Link,
10003
+ { href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
9954
10004
  React__default.createElement(
9955
- Card.Body,
9956
- { style: { padding: '20px' } },
10005
+ 'a',
10006
+ null,
9957
10007
  React__default.createElement(
9958
10008
  Card.Title,
9959
10009
  null,
9960
10010
  row.title
9961
- ),
9962
- _this2.props.showPublished && row.published && React__default.createElement(
9963
- Card.Subtitle,
9964
- { style: { marginTop: 0 } },
9965
- moment(row.published).format('MMMM DD, YYYY')
9966
- ),
9967
- React__default.createElement(
9968
- Card.Text,
9969
- null,
9970
- row.summary
9971
10011
  )
9972
10012
  )
10013
+ ),
10014
+ _this2.props.showPublished && row.published && React__default.createElement(
10015
+ Card.Subtitle,
10016
+ { style: { marginTop: 0 } },
10017
+ moment(row.published).format('MMMM DD, YYYY')
10018
+ ),
10019
+ _this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 && row.authorMapping.map(function (authorDetail, index$$1) {
10020
+ return _this2.renderAuthor(authorDetail, index$$1, row.authorMapping.length);
10021
+ }),
10022
+ React__default.createElement(
10023
+ Card.Text,
10024
+ null,
10025
+ row.summary
9973
10026
  )
9974
10027
  )
9975
10028
  )
@@ -10020,18 +10073,21 @@ var GridContent = function (_React$Component) {
10020
10073
  Card.Title,
10021
10074
  null,
10022
10075
  row.title
10023
- ),
10024
- _this2.props.showPublished && row.published && React__default.createElement(
10025
- Card.Subtitle,
10026
- { style: { marginTop: 0 } },
10027
- moment(row.published).format('MMMM DD, YYYY')
10028
- ),
10029
- React__default.createElement(
10030
- Card.Text,
10031
- { className: index$$1 === 0 || index$$1 % 4 === 0 ? '' : 'card-subtext' },
10032
- row.summary
10033
10076
  )
10034
10077
  )
10078
+ ),
10079
+ _this2.props.showPublished && row.published && React__default.createElement(
10080
+ Card.Subtitle,
10081
+ { style: { marginTop: 0 } },
10082
+ moment(row.published).format('MMMM DD, YYYY')
10083
+ ),
10084
+ _this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 && row.authorMapping.map(function (authorDetail, index$$1) {
10085
+ return _this2.renderAuthor(authorDetail, index$$1, row.authorMapping.length);
10086
+ }),
10087
+ React__default.createElement(
10088
+ Card.Text,
10089
+ { className: index$$1 === 0 || index$$1 % 4 === 0 ? '' : 'card-subtext' },
10090
+ row.summary
10035
10091
  )
10036
10092
  )
10037
10093
  )
@@ -11006,29 +11062,51 @@ var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pagevi
11006
11062
  }
11007
11063
  };
11008
11064
 
11009
- var renderAuthor = function renderAuthor(authorName, authorURL, index$$1, length) {
11010
- if (authorName && authorURL) {
11065
+ var renderAuthor = function renderAuthor(authorDetail, index$$1, length) {
11066
+ var _id = authorDetail._id,
11067
+ displayName = authorDetail.displayName,
11068
+ url = authorDetail.url;
11069
+
11070
+ if (displayName && url && url.current) {
11011
11071
  return React__default.createElement(
11012
- Link,
11013
- { href: '/authors/' + authorURL.current, key: index$$1 },
11072
+ 'div',
11073
+ { key: _id },
11074
+ index$$1 === 0 && React__default.createElement(
11075
+ 'span',
11076
+ { className: 'pr-1' },
11077
+ 'By'
11078
+ ),
11014
11079
  React__default.createElement(
11015
- 'a',
11016
- null,
11017
- authorName,
11018
- length !== index$$1 + 1 && ' | '
11080
+ Link,
11081
+ { href: '/authors/[url]', as: '/authors/' + url.current },
11082
+ React__default.createElement(
11083
+ 'a',
11084
+ { className: 'text-muted' },
11085
+ displayName,
11086
+ length !== index$$1 + 1 && React__default.createElement('br', null)
11087
+ )
11019
11088
  )
11020
11089
  );
11021
- } else if (authorName) {
11090
+ } else if (displayName) {
11022
11091
  return React__default.createElement(
11023
- 'span',
11024
- { key: index$$1 },
11025
- authorName,
11026
- length !== index$$1 + 1 && ' | '
11092
+ 'div',
11093
+ { key: _id },
11094
+ index$$1 === 0 && React__default.createElement(
11095
+ 'span',
11096
+ { className: 'pr-1' },
11097
+ 'By'
11098
+ ),
11099
+ React__default.createElement(
11100
+ 'span',
11101
+ { className: 'text-muted' },
11102
+ displayName,
11103
+ length !== index$$1 + 1 && React__default.createElement('br', null)
11104
+ )
11027
11105
  );
11028
11106
  }
11029
11107
  };
11030
11108
 
11031
- var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage) {
11109
+ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor) {
11032
11110
  return React__default.createElement(
11033
11111
  'div',
11034
11112
  null,
@@ -11082,12 +11160,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
11082
11160
  { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
11083
11161
  moment(article.published).format('MMMM DD, YYYY')
11084
11162
  ),
11085
- article.authorDetails && article.authorDetails.length > 0 && article.authorDetails.map(function (authorDetail, index$$1) {
11086
- return React__default.createElement(
11087
- 'div',
11088
- { className: 'card-text d-inline', key: index$$1 },
11089
- renderAuthor(authorDetail.displayName, authorDetail.url, index$$1, article.authorDetails.length)
11090
- );
11163
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index$$1) {
11164
+ return renderAuthor(authorDetail, index$$1, article.authorMapping.length);
11091
11165
  }),
11092
11166
  article.summary && React__default.createElement(
11093
11167
  'p',
@@ -11139,7 +11213,8 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11139
11213
  mapping = props.mapping,
11140
11214
  seoPaginate = props.seoPaginate,
11141
11215
  pageview = props.pageview,
11142
- defaultImage = props.defaultImage;
11216
+ defaultImage = props.defaultImage,
11217
+ showAuthor = props.showAuthor;
11143
11218
  var initialCurrentPage = props.currentPage,
11144
11219
  showPublished = props.showPublished;
11145
11220
 
@@ -11156,9 +11231,8 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11156
11231
  setScrolling = _useState4[1];
11157
11232
 
11158
11233
  var _useState5 = useState(params ? params.to : 0),
11159
- _useState6 = slicedToArray(_useState5, 2),
11160
- per = _useState6[0],
11161
- setPer = _useState6[1];
11234
+ _useState6 = slicedToArray(_useState5, 1),
11235
+ per = _useState6[0];
11162
11236
 
11163
11237
  var _useState7 = useState(initialCurrentPage || 1),
11164
11238
  _useState8 = slicedToArray(_useState7, 2),
@@ -11198,7 +11272,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11198
11272
  React__default.createElement(
11199
11273
  Container$1,
11200
11274
  null,
11201
- cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage)
11275
+ cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor)
11202
11276
  )
11203
11277
  ),
11204
11278
  React__default.createElement(
@@ -11212,7 +11286,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11212
11286
  React__default.createElement(
11213
11287
  Container$1,
11214
11288
  null,
11215
- cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage)
11289
+ cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor)
11216
11290
  ),
11217
11291
  React__default.createElement(
11218
11292
  'div',
@@ -11258,8 +11332,8 @@ var VideoSeriesListing = function (_React$Component) {
11258
11332
  args[_key] = arguments[_key];
11259
11333
  }
11260
11334
 
11261
- 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 = {
11262
- data: _this.data,
11335
+ 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 = {
11336
+ data: _this.dataArr,
11263
11337
  per: _this.params ? _this.params.to : 2,
11264
11338
  page: _this.props.currentPage || 1,
11265
11339
  from: _this.params ? _this.params.from : 0,
@@ -11307,8 +11381,10 @@ var VideoSeriesListing = function (_React$Component) {
11307
11381
 
11308
11382
  _this.setState(function () {
11309
11383
  if (dataArr.length > 0) {
11384
+ var newDataArr = _this.state.data;
11385
+ newDataArr.push(dataArr);
11310
11386
  return {
11311
- data: [].concat(toConsumableArray(data), toConsumableArray(dataArr)),
11387
+ data: newDataArr,
11312
11388
  scrolling: true
11313
11389
  };
11314
11390
  } else {
@@ -11393,44 +11469,72 @@ var VideoSeriesListing = function (_React$Component) {
11393
11469
  'Next >>'
11394
11470
  )
11395
11471
  );
11472
+ }, _this.renderSeries = function (seriesData) {
11473
+ var itemCounter = 0;
11474
+
11475
+ return React__default.createElement(
11476
+ 'div',
11477
+ null,
11478
+ seriesData && seriesData.map(function (docSeries, index$$1) {
11479
+ docSeries.body[0].videos.map(function (singleVideo, indexInner) {
11480
+ singleVideo.link = '/view/' + docSeries.url.current + '?seriesVid=' + (indexInner + 1);
11481
+ });
11482
+ return React__default.createElement(
11483
+ 'div',
11484
+ { key: index$$1, counter: itemCounter++ },
11485
+ React__default.createElement(
11486
+ 'h4',
11487
+ { className: 'video-title-banner', style: { fontWeight: 'bold', color: 'var(--primary)', padding: '.25rem 0', borderBottom: '2px solid var(--gold)' } },
11488
+ React__default.createElement(
11489
+ Link,
11490
+ { href: '/' + _this.props.page + '/' + docSeries.url.current },
11491
+ React__default.createElement(
11492
+ 'a',
11493
+ null,
11494
+ docSeries.title,
11495
+ React__default.createElement(
11496
+ 'span',
11497
+ { style: { fontSize: '.9rem', color: 'grey', marginLeft: '1rem' } },
11498
+ 'View Topic'
11499
+ )
11500
+ )
11501
+ )
11502
+ ),
11503
+ React__default.createElement(YoutubeGroup, { key: index$$1, dataset: docSeries.body[0].videos })
11504
+ );
11505
+ })
11506
+ );
11396
11507
  }, _temp), possibleConstructorReturn(_this, _ret);
11397
11508
  }
11398
11509
 
11399
11510
  createClass(VideoSeriesListing, [{
11400
11511
  key: 'render',
11401
11512
  value: function render() {
11513
+ var _this2 = this;
11514
+
11402
11515
  return React__default.createElement(
11403
11516
  InfiniteScroll,
11404
11517
  { dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling, scrollThreshold: 0.9 },
11405
11518
  React__default.createElement(
11406
11519
  Container,
11407
11520
  null,
11408
- this.state.data && this.state.data.map(function (docSeries, index$$1) {
11409
- docSeries.body[0].videos && docSeries.body[0].videos.map(function (singleVideo, indexInner) {
11410
- singleVideo.link = '/view/' + docSeries.url.current + '?seriesVid=' + (indexInner + 1);
11411
- });
11521
+ this.state.data && this.state.data.map(function (series, index$$1) {
11522
+ var page = series[0].pageNumber !== 1 ? series[0].pageNumber : index$$1 + 1;
11523
+
11412
11524
  return React__default.createElement(
11413
- 'div',
11414
- null,
11525
+ VisibilitySensor,
11526
+ {
11527
+ partialVisibility: true,
11528
+ offset: { bottom: 400, top: 200 },
11529
+ key: index$$1,
11530
+ onChange: function onChange(isVisible) {
11531
+ isVisible && _this2.changePageNumber(page);
11532
+ } },
11415
11533
  React__default.createElement(
11416
- 'h4',
11417
- { className: 'video-title-banner', style: { fontWeight: 'bold', color: 'var(--primary)', padding: '.25rem 0', borderBottom: '2px solid var(--gold)' } },
11418
- React__default.createElement(
11419
- Link,
11420
- { href: '/case-based-peer-perspectives/' + docSeries.url.current },
11421
- React__default.createElement(
11422
- 'a',
11423
- null,
11424
- docSeries.title,
11425
- React__default.createElement(
11426
- 'span',
11427
- { style: { fontSize: '.9rem', color: 'grey', marginLeft: '1rem' } },
11428
- 'View Topic'
11429
- )
11430
- )
11431
- )
11432
- ),
11433
- React__default.createElement(YoutubeGroup, { key: index$$1, dataset: docSeries.body[0].videos })
11534
+ 'div',
11535
+ null,
11536
+ _this2.renderSeries(series)
11537
+ )
11434
11538
  );
11435
11539
  })
11436
11540
  )
@@ -11788,6 +11892,10 @@ function IconBase(props) {
11788
11892
  }
11789
11893
 
11790
11894
  // THIS FILE IS AUTO GENERATED
11895
+ var IoIosHome = function (props) {
11896
+ 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);
11897
+ };
11898
+ IoIosHome.displayName = "IoIosHome";
11791
11899
  var IoMdArrowDropdown = function (props) {
11792
11900
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M128 192l128 128 128-128z"}}]})(props);
11793
11901
  };
@@ -12079,6 +12187,31 @@ var NavMagazine = function NavMagazine(props) {
12079
12187
  subNav = props.subNav,
12080
12188
  website = props.website;
12081
12189
 
12190
+ var navRef = useRef(null);
12191
+
12192
+ var _useState = useState(false),
12193
+ _useState2 = slicedToArray(_useState, 2),
12194
+ isSticky = _useState2[0],
12195
+ setIsSticky = _useState2[1];
12196
+
12197
+ useEffect(function () {
12198
+ document.addEventListener('scroll', trackScrolling);
12199
+ return function () {
12200
+ document.removeEventListener('scroll', trackScrolling);
12201
+ };
12202
+ // eslint-disable-next-line react-hooks/exhaustive-deps
12203
+ }, []);
12204
+
12205
+ var trackScrolling = function trackScrolling() {
12206
+ var offsetTop = navRef.current.getBoundingClientRect().top;
12207
+
12208
+ if (offsetTop === 0) {
12209
+ setIsSticky(true);
12210
+ } else {
12211
+ setIsSticky(false);
12212
+ }
12213
+ };
12214
+
12082
12215
  return React__default.createElement(
12083
12216
  React__default.Fragment,
12084
12217
  null,
@@ -12111,7 +12244,7 @@ var NavMagazine = function NavMagazine(props) {
12111
12244
  ),
12112
12245
  React__default.createElement(
12113
12246
  Navbar,
12114
- { className: 'bottom-nav', variant: 'dark', expand: 'lg', bg: 'primary', sticky: 'top' },
12247
+ { className: 'bottom-nav', variant: 'dark', expand: 'lg', bg: 'primary', sticky: 'top', ref: navRef },
12115
12248
  React__default.createElement(
12116
12249
  Container,
12117
12250
  { className: 'mobile-nav' },
@@ -12119,6 +12252,15 @@ var NavMagazine = function NavMagazine(props) {
12119
12252
  React__default.createElement(
12120
12253
  Navbar.Collapse,
12121
12254
  { id: 'basic-navbar-nav' },
12255
+ isSticky && React__default.createElement(
12256
+ Link,
12257
+ { href: '/' },
12258
+ React__default.createElement(
12259
+ 'a',
12260
+ null,
12261
+ React__default.createElement(IoIosHome, { size: 20, className: 'sticky-home', color: '#fff' })
12262
+ )
12263
+ ),
12122
12264
  React__default.createElement(
12123
12265
  Nav,
12124
12266
  { className: 'mr-auto' },
@@ -12215,7 +12357,7 @@ var NavMagazine = function NavMagazine(props) {
12215
12357
  React__default.createElement(
12216
12358
  'style',
12217
12359
  { jsx: true },
12218
- '\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 '
12360
+ '\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 '
12219
12361
  )
12220
12362
  );
12221
12363
  };
@@ -13605,26 +13747,38 @@ var AD300x250x600 = function AD300x250x600(_ref) {
13605
13747
  });
13606
13748
  };
13607
13749
 
13750
+ var urlFor$1 = function urlFor(source, client) {
13751
+ var builder = imageUrlBuilder(client);
13752
+ return builder.image(source);
13753
+ };
13754
+
13608
13755
  var FigureComponent = function FigureComponent(_ref) {
13609
13756
  var node$$1 = _ref.node,
13610
13757
  client = _ref.client;
13758
+
13759
+ var imgElement = useRef(null);
13760
+
13761
+ var _useState = useState(null),
13762
+ _useState2 = slicedToArray(_useState, 2),
13763
+ captionWidth = _useState2[0],
13764
+ setcaptionWidth = _useState2[1];
13765
+
13766
+ var _useState3 = useState(''),
13767
+ _useState4 = slicedToArray(_useState3, 2),
13768
+ imgFloat = _useState4[0],
13769
+ setimgFloat = _useState4[1];
13770
+
13611
13771
  var caption = node$$1.caption,
13612
- asset = node$$1.asset,
13613
13772
  alt = node$$1.alt,
13614
13773
  blank = node$$1.blank,
13615
13774
  link = node$$1.link,
13616
- _node$widthP = node$$1.widthP,
13617
- widthP = _node$widthP === undefined ? '100' : _node$widthP,
13775
+ widthP = node$$1.widthP,
13618
13776
  _node$alignment = node$$1.alignment,
13619
13777
  alignment = _node$alignment === undefined ? 'center' : _node$alignment;
13620
13778
 
13621
- var builder = imageUrlBuilder(client);
13622
13779
 
13623
- var urlFor = function urlFor(source) {
13624
- return builder.image(source);
13625
- };
13626
- var imgWidth = widthP + '%';
13627
- var imgFloat = alignment.toLowerCase() === 'center' ? 'none' : alignment.toLowerCase();
13780
+ var imgWidth = widthP ? widthP + '%' : 'auto';
13781
+
13628
13782
  var figureMargin = void 0;
13629
13783
  if (imgFloat === 'none') {
13630
13784
  figureMargin = '0 auto 1rem';
@@ -13635,32 +13789,47 @@ var FigureComponent = function FigureComponent(_ref) {
13635
13789
  if (imgFloat === 'right') {
13636
13790
  figureMargin = '0 10% 1rem 1rem';
13637
13791
  }
13792
+
13793
+ var loadImg = function loadImg() {
13794
+ setcaptionWidth(imgElement.current.naturalWidth);
13795
+ };
13796
+
13797
+ useEffect(function () {
13798
+ var screenWidth = window.innerWidth;
13799
+ if (screenWidth > 1000) {
13800
+ var align = alignment.toLowerCase() === 'center' ? 'none' : alignment.toLowerCase();
13801
+ setimgFloat(align);
13802
+ loadImg();
13803
+ }
13804
+ // eslint-disable-next-line react-hooks/exhaustive-deps
13805
+ }, []);
13806
+
13638
13807
  return React__default.createElement(
13639
13808
  Figure,
13640
- { className: 'd-block text-center mb-3', style: { width: imgWidth, float: imgFloat, margin: figureMargin } },
13809
+ { className: 'd-block text-center mb-3', style: { width: imgWidth, clear: 'both', float: imgFloat, margin: figureMargin } },
13641
13810
  link ? React__default.createElement(
13642
13811
  'a',
13643
13812
  { href: link, target: blank ? '_blank' : '_self' },
13644
- React__default.createElement(Figure.Image, { src: urlFor(node$$1).url(), alt: alt && alt }),
13813
+ React__default.createElement(Figure.Image, { ref: imgElement, onLoad: loadImg, src: urlFor$1(node$$1, client).url(), alt: alt && alt }),
13645
13814
  caption && React__default.createElement(
13646
13815
  Figure.Caption,
13647
- null,
13816
+ { style: { width: captionWidth } },
13648
13817
  caption
13649
13818
  )
13650
13819
  ) : React__default.createElement(
13651
13820
  React__default.Fragment,
13652
13821
  null,
13653
- React__default.createElement(Figure.Image, { src: urlFor(node$$1).url(), alt: alt && alt }),
13822
+ React__default.createElement(Figure.Image, { ref: imgElement, onLoad: loadImg, src: urlFor$1(node$$1, client).url(), alt: alt && alt }),
13654
13823
  caption && React__default.createElement(
13655
13824
  Figure.Caption,
13656
- null,
13825
+ { style: { width: captionWidth } },
13657
13826
  caption
13658
13827
  )
13659
13828
  )
13660
13829
  );
13661
13830
  };
13662
13831
 
13663
- var urlFor$1 = function urlFor(source, builder) {
13832
+ var urlFor$2 = function urlFor(source, builder) {
13664
13833
  return builder.image(source);
13665
13834
  };
13666
13835
 
@@ -13696,7 +13865,7 @@ var Slideshow = function Slideshow(_ref) {
13696
13865
  return React__default.createElement(
13697
13866
  Carousel.Item,
13698
13867
  { key: slide._key },
13699
- React__default.createElement('img', { src: slide.asset && urlFor$1(slide.asset, builder).url(), alt: slide.alt && slide.alt, style: { width: '100%' } }),
13868
+ React__default.createElement('img', { src: slide.asset && urlFor$2(slide.asset, builder).url(), alt: slide.alt && slide.alt, style: { width: '100%' } }),
13700
13869
  slide.caption && React__default.createElement(
13701
13870
  'p',
13702
13871
  { className: 'p-2' },
@@ -19586,7 +19755,9 @@ var Video = function Video(_ref) {
19586
19755
  var source = node.source,
19587
19756
  videoID = node.videoID;
19588
19757
 
19589
- if (source === 'brightcove' && accountIDs.brightcove) return React__default.createElement(ReactPlayerLoader, { accountId: accountIDs.brightcove, videoId: videoID, attrs: { className: 'brightcove' } });
19758
+ if (source === 'brightcove' && accountIDs.brightcove) {
19759
+ return React__default.createElement(ReactPlayerLoader, { accountId: accountIDs.brightcove.accountId, videoId: videoID, playerId: accountIDs.brightcove.playerId, attrs: { className: 'brightcove' } });
19760
+ }
19590
19761
  // TODO - add players for other video types
19591
19762
  return null;
19592
19763
  };
@@ -19807,7 +19978,7 @@ var Poll = function Poll(_ref) {
19807
19978
  response = node.response;
19808
19979
 
19809
19980
 
19810
- var choicesTotolCount = choices && choices.reduce(function (acc, choice) {
19981
+ var choicesTotalCount = choices && choices.reduce(function (acc, choice) {
19811
19982
  acc = acc + parseInt(choice.choiceCount);
19812
19983
  return acc;
19813
19984
  }, 0);
@@ -19848,7 +20019,7 @@ var Poll = function Poll(_ref) {
19848
20019
  'div',
19849
20020
  { className: 'progress-container' },
19850
20021
  showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
19851
- var percentage = Math.floor(choice.choiceCount * 100 / choicesTotolCount);
20022
+ var percentage = choicesTotalCount && choicesTotalCount > 0 ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0;
19852
20023
  return React__default.createElement(
19853
20024
  'div',
19854
20025
  { key: choice._key, className: 'mb-3' },
@@ -19857,16 +20028,24 @@ var Poll = function Poll(_ref) {
19857
20028
  null,
19858
20029
  choice.choiceText
19859
20030
  ),
19860
- React__default.createElement(ProgressBar, { now: percentage, label: percentage + '%' }),
20031
+ React__default.createElement(ProgressBar, { now: percentage }),
19861
20032
  React__default.createElement(
19862
20033
  'span',
19863
20034
  { className: 'float-right' },
20035
+ percentage,
20036
+ '% (',
19864
20037
  choice.choiceCount,
19865
- ' Votes'
20038
+ ' Votes)'
19866
20039
  )
19867
20040
  );
19868
20041
  })
19869
20042
  ),
20043
+ showAnswer && React__default.createElement(
20044
+ 'h4',
20045
+ { className: 'text-center small p-3' },
20046
+ 'Total Votes: ',
20047
+ choicesTotalCount
20048
+ ),
19870
20049
  showAnswer && response && React__default.createElement(BlockContent, { blocks: response }),
19871
20050
  React__default.createElement(
19872
20051
  'style',
@@ -19988,7 +20167,7 @@ var Feature = function Feature(props) {
19988
20167
  null,
19989
20168
  React__default.createElement(
19990
20169
  Carousel$1,
19991
- null,
20170
+ { touch: true },
19992
20171
  dataset.map(function (feature, index) {
19993
20172
  var feature_title = feature.feature_title,
19994
20173
  feature_body = feature.feature_body,
@@ -20072,7 +20251,211 @@ var Breadcrumbs = function Breadcrumbs() {
20072
20251
  );
20073
20252
  };
20074
20253
 
20075
- var urlFor$2 = function urlFor(source, client) {
20254
+ var js_cookie = createCommonjsModule(function (module, exports) {
20255
+ (function (factory) {
20256
+ var registeredInModuleLoader;
20257
+ {
20258
+ module.exports = factory();
20259
+ registeredInModuleLoader = true;
20260
+ }
20261
+ if (!registeredInModuleLoader) {
20262
+ var OldCookies = window.Cookies;
20263
+ var api = window.Cookies = factory();
20264
+ api.noConflict = function () {
20265
+ window.Cookies = OldCookies;
20266
+ return api;
20267
+ };
20268
+ }
20269
+ }(function () {
20270
+ function extend () {
20271
+ var i = 0;
20272
+ var result = {};
20273
+ for (; i < arguments.length; i++) {
20274
+ var attributes = arguments[ i ];
20275
+ for (var key in attributes) {
20276
+ result[key] = attributes[key];
20277
+ }
20278
+ }
20279
+ return result;
20280
+ }
20281
+
20282
+ function decode (s) {
20283
+ return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
20284
+ }
20285
+
20286
+ function init (converter) {
20287
+ function api() {}
20288
+
20289
+ function set (key, value, attributes) {
20290
+ if (typeof document === 'undefined') {
20291
+ return;
20292
+ }
20293
+
20294
+ attributes = extend({
20295
+ path: '/'
20296
+ }, api.defaults, attributes);
20297
+
20298
+ if (typeof attributes.expires === 'number') {
20299
+ attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
20300
+ }
20301
+
20302
+ // We're using "expires" because "max-age" is not supported by IE
20303
+ attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
20304
+
20305
+ try {
20306
+ var result = JSON.stringify(value);
20307
+ if (/^[\{\[]/.test(result)) {
20308
+ value = result;
20309
+ }
20310
+ } catch (e) {}
20311
+
20312
+ value = converter.write ?
20313
+ converter.write(value, key) :
20314
+ encodeURIComponent(String(value))
20315
+ .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
20316
+
20317
+ key = encodeURIComponent(String(key))
20318
+ .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
20319
+ .replace(/[\(\)]/g, escape);
20320
+
20321
+ var stringifiedAttributes = '';
20322
+ for (var attributeName in attributes) {
20323
+ if (!attributes[attributeName]) {
20324
+ continue;
20325
+ }
20326
+ stringifiedAttributes += '; ' + attributeName;
20327
+ if (attributes[attributeName] === true) {
20328
+ continue;
20329
+ }
20330
+
20331
+ // Considers RFC 6265 section 5.2:
20332
+ // ...
20333
+ // 3. If the remaining unparsed-attributes contains a %x3B (";")
20334
+ // character:
20335
+ // Consume the characters of the unparsed-attributes up to,
20336
+ // not including, the first %x3B (";") character.
20337
+ // ...
20338
+ stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
20339
+ }
20340
+
20341
+ return (document.cookie = key + '=' + value + stringifiedAttributes);
20342
+ }
20343
+
20344
+ function get (key, json) {
20345
+ if (typeof document === 'undefined') {
20346
+ return;
20347
+ }
20348
+
20349
+ var jar = {};
20350
+ // To prevent the for loop in the first place assign an empty array
20351
+ // in case there are no cookies at all.
20352
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
20353
+ var i = 0;
20354
+
20355
+ for (; i < cookies.length; i++) {
20356
+ var parts = cookies[i].split('=');
20357
+ var cookie = parts.slice(1).join('=');
20358
+
20359
+ if (!json && cookie.charAt(0) === '"') {
20360
+ cookie = cookie.slice(1, -1);
20361
+ }
20362
+
20363
+ try {
20364
+ var name = decode(parts[0]);
20365
+ cookie = (converter.read || converter)(cookie, name) ||
20366
+ decode(cookie);
20367
+
20368
+ if (json) {
20369
+ try {
20370
+ cookie = JSON.parse(cookie);
20371
+ } catch (e) {}
20372
+ }
20373
+
20374
+ jar[name] = cookie;
20375
+
20376
+ if (key === name) {
20377
+ break;
20378
+ }
20379
+ } catch (e) {}
20380
+ }
20381
+
20382
+ return key ? jar[key] : jar;
20383
+ }
20384
+
20385
+ api.set = set;
20386
+ api.get = function (key) {
20387
+ return get(key, false /* read as raw */);
20388
+ };
20389
+ api.getJSON = function (key) {
20390
+ return get(key, true /* read as json */);
20391
+ };
20392
+ api.remove = function (key, attributes) {
20393
+ set(key, '', extend(attributes, {
20394
+ expires: -1
20395
+ }));
20396
+ };
20397
+
20398
+ api.defaults = {};
20399
+
20400
+ api.withConverter = init;
20401
+
20402
+ return api;
20403
+ }
20404
+
20405
+ return init(function () {});
20406
+ }));
20407
+ });
20408
+
20409
+ var SetCookie = function SetCookie(key, value) {
20410
+ js_cookie.set(key, value, { expires: 1, sameSite: 'none', secure: true });
20411
+ };
20412
+
20413
+ var BreadcrumbsExtended = function BreadcrumbsExtended(_ref) {
20414
+ var childLinks = _ref.childLinks,
20415
+ parentTaxonomy = _ref.parentTaxonomy;
20416
+
20417
+ if (childLinks && childLinks.length > 0) {
20418
+ return React__default.createElement(
20419
+ Breadcrumb,
20420
+ null,
20421
+ childLinks.map(function (item, index) {
20422
+ return React__default.createElement(
20423
+ Breadcrumb.Item,
20424
+ { href: '/' + item.url, key: index },
20425
+ item.name
20426
+ );
20427
+ }),
20428
+ React__default.createElement(
20429
+ 'style',
20430
+ { jsx: true },
20431
+ '\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 '
20432
+ )
20433
+ );
20434
+ } else if (parentTaxonomy.identifier && parentTaxonomy.name) {
20435
+ return React__default.createElement(
20436
+ Breadcrumb,
20437
+ null,
20438
+ React__default.createElement(
20439
+ Breadcrumb.Item,
20440
+ { href: '/' },
20441
+ 'home'
20442
+ ),
20443
+ React__default.createElement(
20444
+ Breadcrumb.Item,
20445
+ { href: '/' + parentTaxonomy.identifier },
20446
+ parentTaxonomy.name
20447
+ ),
20448
+ React__default.createElement(
20449
+ 'style',
20450
+ { jsx: true },
20451
+ '\n ol.breadcrumb {\n background: transparent;\n padding-left: 0.25rem;\n }\n '
20452
+ )
20453
+ );
20454
+ }
20455
+ return null;
20456
+ };
20457
+
20458
+ var urlFor$3 = function urlFor(source, client) {
20076
20459
  var builder = imageUrlBuilder(client);
20077
20460
  return builder.image(source);
20078
20461
  };
@@ -20099,7 +20482,7 @@ var Hero = function Hero(_ref) {
20099
20482
  { className: 'h4' },
20100
20483
  title
20101
20484
  ),
20102
- thumbnail && React__default.createElement(Card$1.Img, { src: urlFor$2(thumbnail, client).url() }),
20485
+ thumbnail && React__default.createElement(Card$1.Img, { src: urlFor$3(thumbnail, client).url() }),
20103
20486
  summary && React__default.createElement(
20104
20487
  Card$1.Footer,
20105
20488
  { className: 'h6' },
@@ -20110,5 +20493,5 @@ var Hero = function Hero(_ref) {
20110
20493
  );
20111
20494
  };
20112
20495
 
20113
- export { ContentCard as DeckContent, GridContent$1 as GridContent, Queue as DeckQueue, ThumbnailCard, TaxonomyCard, GroupDeck, YoutubeGroup, QueueDeckExpanded, VideoSeriesListing$1 as VideoSeriesListing, Column1, Column2, Column3, Header, LeftNav, AccordionPanel, SocialShare, PageFilter, NavMagazine, NavNative, NavNormal, NavDvm, TemplateNormal, AD300x250, AD300x250x600, AD728x90, getSerializers$1 as getSerializers, Search, Feature, Breadcrumbs, Hero };
20496
+ export { ContentCard as DeckContent, GridContent$1 as GridContent, Queue as DeckQueue, ThumbnailCard, TaxonomyCard, GroupDeck, YoutubeGroup, QueueDeckExpanded, VideoSeriesListing$1 as VideoSeriesListing, Column1, Column2, Column3, Header, LeftNav, AccordionPanel, SocialShare, PageFilter, NavMagazine, NavNative, NavNormal, NavDvm, TemplateNormal, AD300x250, AD300x250x600, AD728x90, getSerializers$1 as getSerializers, Search, Feature, Breadcrumbs, SetCookie, BreadcrumbsExtended, Hero };
20114
20497
  //# sourceMappingURL=index.es.js.map