@mjhls/mjh-framework 1.0.104 → 1.0.107

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
@@ -29,6 +29,7 @@ var Navbar = _interopDefault(require('react-bootstrap/Navbar'));
29
29
  var NavDropdown = _interopDefault(require('react-bootstrap/NavDropdown'));
30
30
  var Carousel = _interopDefault(require('react-bootstrap/Carousel'));
31
31
  var Breadcrumb = _interopDefault(require('react-bootstrap/Breadcrumb'));
32
+ var cookie = _interopDefault(require('js-cookie'));
32
33
 
33
34
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
34
35
 
@@ -9901,6 +9902,48 @@ var GridContent = function (_React$Component) {
9901
9902
  }
9902
9903
  }
9903
9904
  }
9905
+ }, _this.renderAuthor = function (authorDetail, index$$1, length) {
9906
+ var _id = authorDetail._id,
9907
+ displayName = authorDetail.displayName,
9908
+ url = authorDetail.url;
9909
+
9910
+ if (displayName && url && url.current) {
9911
+ return React__default.createElement(
9912
+ 'div',
9913
+ { key: _id },
9914
+ index$$1 === 0 && React__default.createElement(
9915
+ 'span',
9916
+ { className: 'pr-1' },
9917
+ 'By'
9918
+ ),
9919
+ React__default.createElement(
9920
+ Link,
9921
+ { href: '/authors/[url]', as: '/authors/' + url.current },
9922
+ React__default.createElement(
9923
+ 'a',
9924
+ { className: 'text-muted' },
9925
+ displayName,
9926
+ length !== index$$1 + 1 && React__default.createElement('br', null)
9927
+ )
9928
+ )
9929
+ );
9930
+ } else if (displayName) {
9931
+ return React__default.createElement(
9932
+ 'div',
9933
+ { key: _id },
9934
+ index$$1 === 0 && React__default.createElement(
9935
+ 'span',
9936
+ { className: 'pr-1' },
9937
+ 'By'
9938
+ ),
9939
+ React__default.createElement(
9940
+ 'span',
9941
+ { className: 'text-muted' },
9942
+ displayName,
9943
+ length !== index$$1 + 1 && React__default.createElement('br', null)
9944
+ )
9945
+ );
9946
+ }
9904
9947
  }, _this.renderManualPagination = function () {
9905
9948
  var currentPage = _this.state.currentPage;
9906
9949
 
@@ -9939,44 +9982,55 @@ var GridContent = function (_React$Component) {
9939
9982
  Col,
9940
9983
  { key: index$$1, md: 12, lg: lgVar, style: { display: 'flex', flex: '1 0 auto' } },
9941
9984
  React__default.createElement(
9942
- Link,
9943
- { href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
9985
+ Card,
9986
+ { className: 'queue-card', style: { borderTop: '1px solid #EEE' } },
9944
9987
  React__default.createElement(
9945
- 'a',
9946
- null,
9988
+ Row,
9989
+ { style: { flexDirection: 'row' } },
9947
9990
  React__default.createElement(
9948
- Card,
9949
- { className: 'queue-card', style: { borderTop: '1px solid #EEE' } },
9991
+ Col,
9992
+ { md: 12, lg: 4 },
9950
9993
  React__default.createElement(
9951
- Row,
9952
- { style: { flexDirection: 'row' } },
9994
+ Link,
9995
+ { href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
9953
9996
  React__default.createElement(
9954
- Col,
9955
- { md: 12, lg: 4 },
9997
+ 'a',
9998
+ null,
9956
9999
  React__default.createElement(Card.Img, { variant: 'top', src: thumbnailURL })
9957
- ),
10000
+ )
10001
+ )
10002
+ ),
10003
+ React__default.createElement(
10004
+ Col,
10005
+ null,
10006
+ React__default.createElement(
10007
+ Card.Body,
10008
+ { style: { padding: '20px' } },
9958
10009
  React__default.createElement(
9959
- Col,
9960
- null,
10010
+ Link,
10011
+ { href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
9961
10012
  React__default.createElement(
9962
- Card.Body,
9963
- { style: { padding: '20px' } },
10013
+ 'a',
10014
+ null,
9964
10015
  React__default.createElement(
9965
10016
  Card.Title,
9966
10017
  null,
9967
10018
  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
10019
  )
9979
10020
  )
10021
+ ),
10022
+ _this2.props.showPublished && row.published && React__default.createElement(
10023
+ Card.Subtitle,
10024
+ { style: { marginTop: 0 } },
10025
+ moment(row.published).format('MMMM DD, YYYY')
10026
+ ),
10027
+ _this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 && row.authorMapping.map(function (authorDetail, index$$1) {
10028
+ return _this2.renderAuthor(authorDetail, index$$1, row.authorMapping.length);
10029
+ }),
10030
+ React__default.createElement(
10031
+ Card.Text,
10032
+ null,
10033
+ row.summary
9980
10034
  )
9981
10035
  )
9982
10036
  )
@@ -10027,18 +10081,21 @@ var GridContent = function (_React$Component) {
10027
10081
  Card.Title,
10028
10082
  null,
10029
10083
  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
10084
  )
10041
10085
  )
10086
+ ),
10087
+ _this2.props.showPublished && row.published && React__default.createElement(
10088
+ Card.Subtitle,
10089
+ { style: { marginTop: 0 } },
10090
+ moment(row.published).format('MMMM DD, YYYY')
10091
+ ),
10092
+ _this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 && row.authorMapping.map(function (authorDetail, index$$1) {
10093
+ return _this2.renderAuthor(authorDetail, index$$1, row.authorMapping.length);
10094
+ }),
10095
+ React__default.createElement(
10096
+ Card.Text,
10097
+ { className: index$$1 === 0 || index$$1 % 4 === 0 ? '' : 'card-subtext' },
10098
+ row.summary
10042
10099
  )
10043
10100
  )
10044
10101
  )
@@ -11013,29 +11070,51 @@ var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pagevi
11013
11070
  }
11014
11071
  };
11015
11072
 
11016
- var renderAuthor = function renderAuthor(authorName, authorURL, index$$1, length) {
11017
- if (authorName && authorURL) {
11073
+ var renderAuthor = function renderAuthor(authorDetail, index$$1, length) {
11074
+ var _id = authorDetail._id,
11075
+ displayName = authorDetail.displayName,
11076
+ url = authorDetail.url;
11077
+
11078
+ if (displayName && url && url.current) {
11018
11079
  return React__default.createElement(
11019
- Link,
11020
- { href: '/authors/' + authorURL.current, key: index$$1 },
11080
+ 'div',
11081
+ { key: _id },
11082
+ index$$1 === 0 && React__default.createElement(
11083
+ 'span',
11084
+ { className: 'pr-1' },
11085
+ 'By'
11086
+ ),
11021
11087
  React__default.createElement(
11022
- 'a',
11023
- null,
11024
- authorName,
11025
- length !== index$$1 + 1 && ' | '
11088
+ Link,
11089
+ { href: '/authors/[url]', as: '/authors/' + url.current },
11090
+ React__default.createElement(
11091
+ 'a',
11092
+ { className: 'text-muted' },
11093
+ displayName,
11094
+ length !== index$$1 + 1 && React__default.createElement('br', null)
11095
+ )
11026
11096
  )
11027
11097
  );
11028
- } else if (authorName) {
11098
+ } else if (displayName) {
11029
11099
  return React__default.createElement(
11030
- 'span',
11031
- { key: index$$1 },
11032
- authorName,
11033
- length !== index$$1 + 1 && ' | '
11100
+ 'div',
11101
+ { key: _id },
11102
+ index$$1 === 0 && React__default.createElement(
11103
+ 'span',
11104
+ { className: 'pr-1' },
11105
+ 'By'
11106
+ ),
11107
+ React__default.createElement(
11108
+ 'span',
11109
+ { className: 'text-muted' },
11110
+ displayName,
11111
+ length !== index$$1 + 1 && React__default.createElement('br', null)
11112
+ )
11034
11113
  );
11035
11114
  }
11036
11115
  };
11037
11116
 
11038
- var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage) {
11117
+ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor) {
11039
11118
  return React__default.createElement(
11040
11119
  'div',
11041
11120
  null,
@@ -11089,12 +11168,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
11089
11168
  { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
11090
11169
  moment(article.published).format('MMMM DD, YYYY')
11091
11170
  ),
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
- );
11171
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index$$1) {
11172
+ return renderAuthor(authorDetail, index$$1, article.authorMapping.length);
11098
11173
  }),
11099
11174
  article.summary && React__default.createElement(
11100
11175
  'p',
@@ -11146,7 +11221,8 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11146
11221
  mapping = props.mapping,
11147
11222
  seoPaginate = props.seoPaginate,
11148
11223
  pageview = props.pageview,
11149
- defaultImage = props.defaultImage;
11224
+ defaultImage = props.defaultImage,
11225
+ showAuthor = props.showAuthor;
11150
11226
  var initialCurrentPage = props.currentPage,
11151
11227
  showPublished = props.showPublished;
11152
11228
 
@@ -11163,9 +11239,8 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11163
11239
  setScrolling = _useState4[1];
11164
11240
 
11165
11241
  var _useState5 = React.useState(params ? params.to : 0),
11166
- _useState6 = slicedToArray(_useState5, 2),
11167
- per = _useState6[0],
11168
- setPer = _useState6[1];
11242
+ _useState6 = slicedToArray(_useState5, 1),
11243
+ per = _useState6[0];
11169
11244
 
11170
11245
  var _useState7 = React.useState(initialCurrentPage || 1),
11171
11246
  _useState8 = slicedToArray(_useState7, 2),
@@ -11205,7 +11280,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11205
11280
  React__default.createElement(
11206
11281
  reactBootstrap.Container,
11207
11282
  null,
11208
- cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage)
11283
+ cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor)
11209
11284
  )
11210
11285
  ),
11211
11286
  React__default.createElement(
@@ -11219,7 +11294,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11219
11294
  React__default.createElement(
11220
11295
  reactBootstrap.Container,
11221
11296
  null,
11222
- cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage)
11297
+ cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor)
11223
11298
  ),
11224
11299
  React__default.createElement(
11225
11300
  'div',
@@ -11251,6 +11326,233 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11251
11326
  );
11252
11327
  };
11253
11328
 
11329
+ var VideoSeriesListing = function (_React$Component) {
11330
+ inherits(VideoSeriesListing, _React$Component);
11331
+
11332
+ function VideoSeriesListing() {
11333
+ var _ref;
11334
+
11335
+ var _temp, _this, _ret;
11336
+
11337
+ classCallCheck(this, VideoSeriesListing);
11338
+
11339
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
11340
+ args[_key] = arguments[_key];
11341
+ }
11342
+
11343
+ 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 = {
11344
+ data: _this.dataArr,
11345
+ per: _this.params ? _this.params.to : 2,
11346
+ page: _this.props.currentPage || 1,
11347
+ from: _this.params ? _this.params.from : 0,
11348
+ to: _this.params ? _this.params.to : 2,
11349
+ total_pages: null,
11350
+ scrolling: true,
11351
+ query: _this.query,
11352
+ currentPage: _this.props.currentPage || 1
11353
+ }, _this.loadMore = debounce_1(function () {
11354
+ _this.setState(function (state) {
11355
+ var page = state.page,
11356
+ from = state.from,
11357
+ per = state.per,
11358
+ to = state.to;
11359
+
11360
+ return {
11361
+ page: page + 1,
11362
+ from: from + per,
11363
+ to: to + per
11364
+ };
11365
+ }, _this.loadData);
11366
+ }, 0), _this.loadData = function () {
11367
+ var _this$state = _this.state,
11368
+ from = _this$state.from,
11369
+ to = _this$state.to,
11370
+ data = _this$state.data,
11371
+ query = _this$state.query,
11372
+ page = _this$state.page;
11373
+ var client = _this.props.client;
11374
+
11375
+ _this.changePageNumber(page);
11376
+ var params = _extends({}, _this.params, { from: from, to: to
11377
+ // const queryUpdated = query.replace('$from', params.from).replace('$to', params.to)
11378
+ // const query = '*[_type == "article" && defined(title) && defined(thumbnail)][$from...$to] { title, summary, thumbnail { asset-> }, url }'
11379
+ });client.fetch(query, params).then(function (dataArr) {
11380
+ if (_this.pointer && _this.pointerArray) {
11381
+ var pointer = _this.pointer;
11382
+ dataArr = dataArr[_this.pointerArray][pointer];
11383
+ }
11384
+ dataArr = dataArr.map(function (item) {
11385
+ return _extends({}, item, {
11386
+ pageNumber: page
11387
+ });
11388
+ });
11389
+
11390
+ _this.setState(function () {
11391
+ if (dataArr.length > 0) {
11392
+ var newDataArr = _this.state.data;
11393
+ newDataArr.push(dataArr);
11394
+ return {
11395
+ data: newDataArr,
11396
+ scrolling: true
11397
+ };
11398
+ } else {
11399
+ return {
11400
+ scrolling: false
11401
+ };
11402
+ }
11403
+ });
11404
+ });
11405
+ }, _this.changePageNumber = function (pageNumber) {
11406
+ var _this$props = _this.props,
11407
+ seoPaginate = _this$props.seoPaginate,
11408
+ pageview = _this$props.pageview,
11409
+ router$$1 = _this$props.router;
11410
+ var currentPage = _this.state.currentPage;
11411
+
11412
+ if (seoPaginate) {
11413
+ var path = router$$1.asPath;
11414
+ var qrIndex = path.indexOf('?');
11415
+ var pathname = router$$1.pathname;
11416
+ var queryString = '';
11417
+
11418
+ if (qrIndex > 0) {
11419
+ path = path.substring(1, qrIndex);
11420
+
11421
+ var partialQS = router$$1.asPath.substring(qrIndex + 1);
11422
+ var partialQSArr = partialQS.split('&');
11423
+
11424
+ // exclude page=xxx from query string
11425
+ partialQSArr.map(function (item) {
11426
+ var itemArr = item.split('=');
11427
+ var key = itemArr[0];
11428
+ var val = itemArr[1];
11429
+
11430
+ if (key !== 'page') {
11431
+ queryString += (queryString.length === 0 ? '' : '&') + key + '=' + val;
11432
+ }
11433
+ });
11434
+ }
11435
+
11436
+ if (queryString.length > 0) {
11437
+ path += '?' + queryString;
11438
+ }
11439
+
11440
+ pageNumber = parseInt(pageNumber);
11441
+
11442
+ if (currentPage !== pageNumber) {
11443
+ lib_3.refresh();
11444
+ if (pageview) {
11445
+ _this.setState({
11446
+ currentPage: pageNumber
11447
+ }, function () {
11448
+ if (path[0] !== '/') {
11449
+ path = '/' + path;
11450
+ }
11451
+
11452
+ var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
11453
+
11454
+ pageview(newPath);
11455
+
11456
+ router$$1.push(pathname, newPath, {
11457
+ shallow: true
11458
+ });
11459
+ });
11460
+ }
11461
+ }
11462
+ }
11463
+ }, _this.renderManualPagination = function () {
11464
+ var currentPage = _this.state.currentPage;
11465
+
11466
+ return React__default.createElement(
11467
+ 'div',
11468
+ { className: 'd-flex justify-content-between' },
11469
+ currentPage && currentPage > 1 && React__default.createElement(
11470
+ 'a',
11471
+ { href: '?page=' + (currentPage - 1) },
11472
+ '<< Previous'
11473
+ ),
11474
+ React__default.createElement(
11475
+ 'a',
11476
+ { href: '?page=' + (currentPage + 1) },
11477
+ 'Next >>'
11478
+ )
11479
+ );
11480
+ }, _this.renderSeries = function (seriesData) {
11481
+ var itemCounter = 0;
11482
+
11483
+ return React__default.createElement(
11484
+ 'div',
11485
+ null,
11486
+ seriesData && seriesData.map(function (docSeries, index$$1) {
11487
+ docSeries.body[0].videos.map(function (singleVideo, indexInner) {
11488
+ singleVideo.link = '/view/' + docSeries.url.current + '?seriesVid=' + (indexInner + 1);
11489
+ });
11490
+ return React__default.createElement(
11491
+ 'div',
11492
+ { key: index$$1, counter: itemCounter++ },
11493
+ React__default.createElement(
11494
+ 'h4',
11495
+ { className: 'video-title-banner', style: { fontWeight: 'bold', color: 'var(--primary)', padding: '.25rem 0', borderBottom: '2px solid var(--gold)' } },
11496
+ React__default.createElement(
11497
+ Link,
11498
+ { href: '/' + _this.props.page + '/' + docSeries.url.current },
11499
+ React__default.createElement(
11500
+ 'a',
11501
+ null,
11502
+ docSeries.title,
11503
+ React__default.createElement(
11504
+ 'span',
11505
+ { style: { fontSize: '.9rem', color: 'grey', marginLeft: '1rem' } },
11506
+ 'View Topic'
11507
+ )
11508
+ )
11509
+ )
11510
+ ),
11511
+ React__default.createElement(YoutubeGroup, { key: index$$1, dataset: docSeries.body[0].videos })
11512
+ );
11513
+ })
11514
+ );
11515
+ }, _temp), possibleConstructorReturn(_this, _ret);
11516
+ }
11517
+
11518
+ createClass(VideoSeriesListing, [{
11519
+ key: 'render',
11520
+ value: function render() {
11521
+ var _this2 = this;
11522
+
11523
+ return React__default.createElement(
11524
+ InfiniteScroll,
11525
+ { dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling, scrollThreshold: 0.9 },
11526
+ React__default.createElement(
11527
+ Container,
11528
+ null,
11529
+ this.state.data && this.state.data.map(function (series, index$$1) {
11530
+ var page = series[0].pageNumber !== 1 ? series[0].pageNumber : index$$1 + 1;
11531
+
11532
+ return React__default.createElement(
11533
+ VisibilitySensor,
11534
+ {
11535
+ partialVisibility: true,
11536
+ offset: { bottom: 400, top: 200 },
11537
+ key: index$$1,
11538
+ onChange: function onChange(isVisible) {
11539
+ isVisible && _this2.changePageNumber(page);
11540
+ } },
11541
+ React__default.createElement(
11542
+ 'div',
11543
+ null,
11544
+ _this2.renderSeries(series)
11545
+ )
11546
+ );
11547
+ })
11548
+ )
11549
+ );
11550
+ }
11551
+ }]);
11552
+ return VideoSeriesListing;
11553
+ }(React__default.Component);
11554
+ var VideoSeriesListing$1 = router.withRouter(VideoSeriesListing);
11555
+
11254
11556
  var Column1 = function Column1(props) {
11255
11557
  var title = props.title;
11256
11558
 
@@ -11598,6 +11900,10 @@ function IconBase(props) {
11598
11900
  }
11599
11901
 
11600
11902
  // THIS FILE IS AUTO GENERATED
11903
+ var IoIosHome = function (props) {
11904
+ 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);
11905
+ };
11906
+ IoIosHome.displayName = "IoIosHome";
11601
11907
  var IoMdArrowDropdown = function (props) {
11602
11908
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M128 192l128 128 128-128z"}}]})(props);
11603
11909
  };
@@ -11889,6 +12195,31 @@ var NavMagazine = function NavMagazine(props) {
11889
12195
  subNav = props.subNav,
11890
12196
  website = props.website;
11891
12197
 
12198
+ var navRef = React.useRef(null);
12199
+
12200
+ var _useState = React.useState(false),
12201
+ _useState2 = slicedToArray(_useState, 2),
12202
+ isSticky = _useState2[0],
12203
+ setIsSticky = _useState2[1];
12204
+
12205
+ React.useEffect(function () {
12206
+ document.addEventListener('scroll', trackScrolling);
12207
+ return function () {
12208
+ document.removeEventListener('scroll', trackScrolling);
12209
+ };
12210
+ // eslint-disable-next-line react-hooks/exhaustive-deps
12211
+ }, []);
12212
+
12213
+ var trackScrolling = function trackScrolling() {
12214
+ var offsetTop = navRef.current.getBoundingClientRect().top;
12215
+
12216
+ if (offsetTop === 0) {
12217
+ setIsSticky(true);
12218
+ } else {
12219
+ setIsSticky(false);
12220
+ }
12221
+ };
12222
+
11892
12223
  return React__default.createElement(
11893
12224
  React__default.Fragment,
11894
12225
  null,
@@ -11921,7 +12252,7 @@ var NavMagazine = function NavMagazine(props) {
11921
12252
  ),
11922
12253
  React__default.createElement(
11923
12254
  Navbar,
11924
- { className: 'bottom-nav', variant: 'dark', expand: 'lg', bg: 'primary', sticky: 'top' },
12255
+ { className: 'bottom-nav', variant: 'dark', expand: 'lg', bg: 'primary', sticky: 'top', ref: navRef },
11925
12256
  React__default.createElement(
11926
12257
  Container,
11927
12258
  { className: 'mobile-nav' },
@@ -11929,6 +12260,15 @@ var NavMagazine = function NavMagazine(props) {
11929
12260
  React__default.createElement(
11930
12261
  Navbar.Collapse,
11931
12262
  { id: 'basic-navbar-nav' },
12263
+ isSticky && React__default.createElement(
12264
+ Link,
12265
+ { href: '/' },
12266
+ React__default.createElement(
12267
+ 'a',
12268
+ null,
12269
+ React__default.createElement(IoIosHome, { size: 20, className: 'sticky-home', color: '#fff' })
12270
+ )
12271
+ ),
11932
12272
  React__default.createElement(
11933
12273
  Nav,
11934
12274
  { className: 'mr-auto' },
@@ -12011,6 +12351,48 @@ var NavMagazine = function NavMagazine(props) {
12011
12351
  })
12012
12352
  )
12013
12353
  ),
12354
+ React__default.createElement(
12355
+ Navbar.Collapse,
12356
+ { id: 'basic-navbar-nav' },
12357
+ React__default.createElement(
12358
+ Nav,
12359
+ { className: 'mr-auto' },
12360
+ dataObject && dataObject.map(function (row, index) {
12361
+ if (row.subQuery && row.subQuery.length > 0) {
12362
+ return row.name ? React__default.createElement(
12363
+ NavDropdown,
12364
+ { key: index, title: row.name, id: 'basic-nav-dropdown' },
12365
+ row.subQuery && row.subQuery.map(function (ddRow, subIndex) {
12366
+ if (ddRow.type === 'divider') {
12367
+ return React__default.createElement(NavDropdown.Divider, { key: subIndex });
12368
+ } else {
12369
+ return ddRow.url && ddRow.name ? React__default.createElement(
12370
+ Link,
12371
+ { key: subIndex, href: ddRow.url },
12372
+ React__default.createElement(
12373
+ 'a',
12374
+ { target: ddRow.blank ? '_blank' : '_self', className: 'dropdown-item' },
12375
+ ddRow.name
12376
+ )
12377
+ ) : null;
12378
+ }
12379
+ })
12380
+ ) : null;
12381
+ } else {
12382
+ return row.url && row.name ? React__default.createElement(
12383
+ Link,
12384
+ { key: index, href: row.url },
12385
+ React__default.createElement(
12386
+ 'a',
12387
+ { target: row.blank ? '_blank' : '_self', className: 'nav-link' },
12388
+ row.name
12389
+ )
12390
+ ) : null;
12391
+ }
12392
+ })
12393
+ ),
12394
+ React__default.createElement(Search, { device: 'mobile' })
12395
+ ),
12014
12396
  website && React__default.createElement(
12015
12397
  Navbar.Collapse,
12016
12398
  { id: 'basic-navbar-sub' },
@@ -12025,7 +12407,7 @@ var NavMagazine = function NavMagazine(props) {
12025
12407
  React__default.createElement(
12026
12408
  'style',
12027
12409
  { jsx: true },
12028
- '\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 '
12410
+ '\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 '
12029
12411
  )
12030
12412
  );
12031
12413
  };
@@ -13415,26 +13797,38 @@ var AD300x250x600 = function AD300x250x600(_ref) {
13415
13797
  });
13416
13798
  };
13417
13799
 
13800
+ var urlFor$1 = function urlFor(source, client) {
13801
+ var builder = imageUrlBuilder(client);
13802
+ return builder.image(source);
13803
+ };
13804
+
13418
13805
  var FigureComponent = function FigureComponent(_ref) {
13419
13806
  var node$$1 = _ref.node,
13420
13807
  client = _ref.client;
13808
+
13809
+ var imgElement = React.useRef(null);
13810
+
13811
+ var _useState = React.useState(null),
13812
+ _useState2 = slicedToArray(_useState, 2),
13813
+ captionWidth = _useState2[0],
13814
+ setcaptionWidth = _useState2[1];
13815
+
13816
+ var _useState3 = React.useState(''),
13817
+ _useState4 = slicedToArray(_useState3, 2),
13818
+ imgFloat = _useState4[0],
13819
+ setimgFloat = _useState4[1];
13820
+
13421
13821
  var caption = node$$1.caption,
13422
- asset = node$$1.asset,
13423
13822
  alt = node$$1.alt,
13424
13823
  blank = node$$1.blank,
13425
13824
  link = node$$1.link,
13426
- _node$widthP = node$$1.widthP,
13427
- widthP = _node$widthP === undefined ? '100' : _node$widthP,
13825
+ widthP = node$$1.widthP,
13428
13826
  _node$alignment = node$$1.alignment,
13429
13827
  alignment = _node$alignment === undefined ? 'center' : _node$alignment;
13430
13828
 
13431
- var builder = imageUrlBuilder(client);
13432
13829
 
13433
- var urlFor = function urlFor(source) {
13434
- return builder.image(source);
13435
- };
13436
- var imgWidth = widthP + '%';
13437
- var imgFloat = alignment.toLowerCase() === 'center' ? 'none' : alignment.toLowerCase();
13830
+ var imgWidth = widthP ? widthP + '%' : 'auto';
13831
+
13438
13832
  var figureMargin = void 0;
13439
13833
  if (imgFloat === 'none') {
13440
13834
  figureMargin = '0 auto 1rem';
@@ -13445,32 +13839,47 @@ var FigureComponent = function FigureComponent(_ref) {
13445
13839
  if (imgFloat === 'right') {
13446
13840
  figureMargin = '0 10% 1rem 1rem';
13447
13841
  }
13842
+
13843
+ var loadImg = function loadImg() {
13844
+ setcaptionWidth(imgElement.current.naturalWidth);
13845
+ };
13846
+
13847
+ React.useEffect(function () {
13848
+ var screenWidth = window.innerWidth;
13849
+ if (screenWidth > 1000) {
13850
+ var align = alignment.toLowerCase() === 'center' ? 'none' : alignment.toLowerCase();
13851
+ setimgFloat(align);
13852
+ loadImg();
13853
+ }
13854
+ // eslint-disable-next-line react-hooks/exhaustive-deps
13855
+ }, []);
13856
+
13448
13857
  return React__default.createElement(
13449
13858
  reactBootstrap.Figure,
13450
- { className: 'd-block text-center mb-3', style: { width: imgWidth, float: imgFloat, margin: figureMargin } },
13859
+ { className: 'd-block text-center mb-3', style: { width: imgWidth, clear: 'both', float: imgFloat, margin: figureMargin } },
13451
13860
  link ? React__default.createElement(
13452
13861
  'a',
13453
13862
  { href: link, target: blank ? '_blank' : '_self' },
13454
- React__default.createElement(reactBootstrap.Figure.Image, { src: urlFor(node$$1).url(), alt: alt && alt }),
13863
+ React__default.createElement(reactBootstrap.Figure.Image, { ref: imgElement, onLoad: loadImg, src: urlFor$1(node$$1, client).url(), alt: alt && alt }),
13455
13864
  caption && React__default.createElement(
13456
13865
  reactBootstrap.Figure.Caption,
13457
- null,
13866
+ { style: { width: captionWidth } },
13458
13867
  caption
13459
13868
  )
13460
13869
  ) : React__default.createElement(
13461
13870
  React__default.Fragment,
13462
13871
  null,
13463
- React__default.createElement(reactBootstrap.Figure.Image, { src: urlFor(node$$1).url(), alt: alt && alt }),
13872
+ React__default.createElement(reactBootstrap.Figure.Image, { ref: imgElement, onLoad: loadImg, src: urlFor$1(node$$1, client).url(), alt: alt && alt }),
13464
13873
  caption && React__default.createElement(
13465
13874
  reactBootstrap.Figure.Caption,
13466
- null,
13875
+ { style: { width: captionWidth } },
13467
13876
  caption
13468
13877
  )
13469
13878
  )
13470
13879
  );
13471
13880
  };
13472
13881
 
13473
- var urlFor$1 = function urlFor(source, builder) {
13882
+ var urlFor$2 = function urlFor(source, builder) {
13474
13883
  return builder.image(source);
13475
13884
  };
13476
13885
 
@@ -13506,7 +13915,7 @@ var Slideshow = function Slideshow(_ref) {
13506
13915
  return React__default.createElement(
13507
13916
  reactBootstrap.Carousel.Item,
13508
13917
  { key: slide._key },
13509
- React__default.createElement('img', { src: slide.asset && urlFor$1(slide.asset, builder).url(), alt: slide.alt && slide.alt, style: { width: '100%' } }),
13918
+ React__default.createElement('img', { src: slide.asset && urlFor$2(slide.asset, builder).url(), alt: slide.alt && slide.alt, style: { width: '100%' } }),
13510
13919
  slide.caption && React__default.createElement(
13511
13920
  'p',
13512
13921
  { className: 'p-2' },
@@ -19396,7 +19805,9 @@ var Video = function Video(_ref) {
19396
19805
  var source = node.source,
19397
19806
  videoID = node.videoID;
19398
19807
 
19399
- if (source === 'brightcove' && accountIDs.brightcove) return React__default.createElement(ReactPlayerLoader, { accountId: accountIDs.brightcove, videoId: videoID, attrs: { className: 'brightcove' } });
19808
+ if (source === 'brightcove' && accountIDs.brightcove) {
19809
+ return React__default.createElement(ReactPlayerLoader, { accountId: accountIDs.brightcove.accountId, videoId: videoID, playerId: accountIDs.brightcove.playerId, attrs: { className: 'brightcove' } });
19810
+ }
19400
19811
  // TODO - add players for other video types
19401
19812
  return null;
19402
19813
  };
@@ -19617,7 +20028,7 @@ var Poll = function Poll(_ref) {
19617
20028
  response = node.response;
19618
20029
 
19619
20030
 
19620
- var choicesTotolCount = choices && choices.reduce(function (acc, choice) {
20031
+ var choicesTotalCount = choices && choices.reduce(function (acc, choice) {
19621
20032
  acc = acc + parseInt(choice.choiceCount);
19622
20033
  return acc;
19623
20034
  }, 0);
@@ -19658,7 +20069,7 @@ var Poll = function Poll(_ref) {
19658
20069
  'div',
19659
20070
  { className: 'progress-container' },
19660
20071
  showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
19661
- var percentage = Math.floor(choice.choiceCount * 100 / choicesTotolCount);
20072
+ var percentage = choicesTotalCount && choicesTotalCount > 0 ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0;
19662
20073
  return React__default.createElement(
19663
20074
  'div',
19664
20075
  { key: choice._key, className: 'mb-3' },
@@ -19667,16 +20078,24 @@ var Poll = function Poll(_ref) {
19667
20078
  null,
19668
20079
  choice.choiceText
19669
20080
  ),
19670
- React__default.createElement(reactBootstrap.ProgressBar, { now: percentage, label: percentage + '%' }),
20081
+ React__default.createElement(reactBootstrap.ProgressBar, { now: percentage }),
19671
20082
  React__default.createElement(
19672
20083
  'span',
19673
20084
  { className: 'float-right' },
20085
+ percentage,
20086
+ '% (',
19674
20087
  choice.choiceCount,
19675
- ' Votes'
20088
+ ' Votes)'
19676
20089
  )
19677
20090
  );
19678
20091
  })
19679
20092
  ),
20093
+ showAnswer && React__default.createElement(
20094
+ 'h4',
20095
+ { className: 'text-center small p-3' },
20096
+ 'Total Votes: ',
20097
+ choicesTotalCount
20098
+ ),
19680
20099
  showAnswer && response && React__default.createElement(BlockContent, { blocks: response }),
19681
20100
  React__default.createElement(
19682
20101
  'style',
@@ -19798,7 +20217,7 @@ var Feature = function Feature(props) {
19798
20217
  null,
19799
20218
  React__default.createElement(
19800
20219
  Carousel,
19801
- null,
20220
+ { touch: true },
19802
20221
  dataset.map(function (feature, index) {
19803
20222
  var feature_title = feature.feature_title,
19804
20223
  feature_body = feature.feature_body,
@@ -19882,7 +20301,56 @@ var Breadcrumbs = function Breadcrumbs() {
19882
20301
  );
19883
20302
  };
19884
20303
 
19885
- var urlFor$2 = function urlFor(source, client) {
20304
+ var SetCookie = function SetCookie(key, value) {
20305
+ cookie.set(key, value, { expires: 1, sameSite: 'none', secure: true });
20306
+ };
20307
+
20308
+ var BreadcrumbsExtended = function BreadcrumbsExtended(_ref) {
20309
+ var childLinks = _ref.childLinks,
20310
+ parentTaxonomy = _ref.parentTaxonomy;
20311
+
20312
+ if (childLinks && childLinks.length > 0) {
20313
+ return React__default.createElement(
20314
+ Breadcrumb,
20315
+ null,
20316
+ childLinks.map(function (item, index) {
20317
+ return React__default.createElement(
20318
+ Breadcrumb.Item,
20319
+ { href: '/' + item.url, key: index },
20320
+ item.name
20321
+ );
20322
+ }),
20323
+ React__default.createElement(
20324
+ 'style',
20325
+ { jsx: true },
20326
+ '\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 '
20327
+ )
20328
+ );
20329
+ } else if (parentTaxonomy.identifier && parentTaxonomy.name) {
20330
+ return React__default.createElement(
20331
+ Breadcrumb,
20332
+ null,
20333
+ React__default.createElement(
20334
+ Breadcrumb.Item,
20335
+ { href: '/' },
20336
+ 'home'
20337
+ ),
20338
+ React__default.createElement(
20339
+ Breadcrumb.Item,
20340
+ { href: '/' + parentTaxonomy.identifier },
20341
+ parentTaxonomy.name
20342
+ ),
20343
+ React__default.createElement(
20344
+ 'style',
20345
+ { jsx: true },
20346
+ '\n ol.breadcrumb {\n background: transparent;\n padding-left: 0.25rem;\n }\n '
20347
+ )
20348
+ );
20349
+ }
20350
+ return null;
20351
+ };
20352
+
20353
+ var urlFor$3 = function urlFor(source, client) {
19886
20354
  var builder = imageUrlBuilder(client);
19887
20355
  return builder.image(source);
19888
20356
  };
@@ -19909,7 +20377,7 @@ var Hero = function Hero(_ref) {
19909
20377
  { className: 'h4' },
19910
20378
  title
19911
20379
  ),
19912
- thumbnail && React__default.createElement(reactBootstrap.Card.Img, { src: urlFor$2(thumbnail, client).url() }),
20380
+ thumbnail && React__default.createElement(reactBootstrap.Card.Img, { src: urlFor$3(thumbnail, client).url() }),
19913
20381
  summary && React__default.createElement(
19914
20382
  reactBootstrap.Card.Footer,
19915
20383
  { className: 'h6' },
@@ -19928,6 +20396,7 @@ exports.TaxonomyCard = TaxonomyCard;
19928
20396
  exports.GroupDeck = GroupDeck;
19929
20397
  exports.YoutubeGroup = YoutubeGroup;
19930
20398
  exports.QueueDeckExpanded = QueueDeckExpanded;
20399
+ exports.VideoSeriesListing = VideoSeriesListing$1;
19931
20400
  exports.Column1 = Column1;
19932
20401
  exports.Column2 = Column2;
19933
20402
  exports.Column3 = Column3;
@@ -19948,5 +20417,7 @@ exports.getSerializers = getSerializers$1;
19948
20417
  exports.Search = Search;
19949
20418
  exports.Feature = Feature;
19950
20419
  exports.Breadcrumbs = Breadcrumbs;
20420
+ exports.SetCookie = SetCookie;
20421
+ exports.BreadcrumbsExtended = BreadcrumbsExtended;
19951
20422
  exports.Hero = Hero;
19952
20423
  //# sourceMappingURL=index.js.map