@mjhls/mjh-framework 1.0.105 → 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.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';
@@ -22,6 +22,7 @@ import Navbar from 'react-bootstrap/Navbar';
22
22
  import NavDropdown from 'react-bootstrap/NavDropdown';
23
23
  import Carousel$1 from 'react-bootstrap/Carousel';
24
24
  import Breadcrumb from 'react-bootstrap/Breadcrumb';
25
+ import cookie from 'js-cookie';
25
26
 
26
27
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
27
28
 
@@ -9894,6 +9895,48 @@ var GridContent = function (_React$Component) {
9894
9895
  }
9895
9896
  }
9896
9897
  }
9898
+ }, _this.renderAuthor = function (authorDetail, index$$1, length) {
9899
+ var _id = authorDetail._id,
9900
+ displayName = authorDetail.displayName,
9901
+ url = authorDetail.url;
9902
+
9903
+ if (displayName && url && url.current) {
9904
+ return React__default.createElement(
9905
+ 'div',
9906
+ { key: _id },
9907
+ index$$1 === 0 && React__default.createElement(
9908
+ 'span',
9909
+ { className: 'pr-1' },
9910
+ 'By'
9911
+ ),
9912
+ React__default.createElement(
9913
+ Link,
9914
+ { href: '/authors/[url]', as: '/authors/' + url.current },
9915
+ React__default.createElement(
9916
+ 'a',
9917
+ { className: 'text-muted' },
9918
+ displayName,
9919
+ length !== index$$1 + 1 && React__default.createElement('br', null)
9920
+ )
9921
+ )
9922
+ );
9923
+ } else if (displayName) {
9924
+ return React__default.createElement(
9925
+ 'div',
9926
+ { key: _id },
9927
+ index$$1 === 0 && React__default.createElement(
9928
+ 'span',
9929
+ { className: 'pr-1' },
9930
+ 'By'
9931
+ ),
9932
+ React__default.createElement(
9933
+ 'span',
9934
+ { className: 'text-muted' },
9935
+ displayName,
9936
+ length !== index$$1 + 1 && React__default.createElement('br', null)
9937
+ )
9938
+ );
9939
+ }
9897
9940
  }, _this.renderManualPagination = function () {
9898
9941
  var currentPage = _this.state.currentPage;
9899
9942
 
@@ -9932,44 +9975,55 @@ var GridContent = function (_React$Component) {
9932
9975
  Col,
9933
9976
  { key: index$$1, md: 12, lg: lgVar, style: { display: 'flex', flex: '1 0 auto' } },
9934
9977
  React__default.createElement(
9935
- Link,
9936
- { href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
9978
+ Card,
9979
+ { className: 'queue-card', style: { borderTop: '1px solid #EEE' } },
9937
9980
  React__default.createElement(
9938
- 'a',
9939
- null,
9981
+ Row,
9982
+ { style: { flexDirection: 'row' } },
9940
9983
  React__default.createElement(
9941
- Card,
9942
- { className: 'queue-card', style: { borderTop: '1px solid #EEE' } },
9984
+ Col,
9985
+ { md: 12, lg: 4 },
9943
9986
  React__default.createElement(
9944
- Row,
9945
- { style: { flexDirection: 'row' } },
9987
+ Link,
9988
+ { href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
9946
9989
  React__default.createElement(
9947
- Col,
9948
- { md: 12, lg: 4 },
9990
+ 'a',
9991
+ null,
9949
9992
  React__default.createElement(Card.Img, { variant: 'top', src: thumbnailURL })
9950
- ),
9993
+ )
9994
+ )
9995
+ ),
9996
+ React__default.createElement(
9997
+ Col,
9998
+ null,
9999
+ React__default.createElement(
10000
+ Card.Body,
10001
+ { style: { padding: '20px' } },
9951
10002
  React__default.createElement(
9952
- Col,
9953
- null,
10003
+ Link,
10004
+ { href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
9954
10005
  React__default.createElement(
9955
- Card.Body,
9956
- { style: { padding: '20px' } },
10006
+ 'a',
10007
+ null,
9957
10008
  React__default.createElement(
9958
10009
  Card.Title,
9959
10010
  null,
9960
10011
  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
10012
  )
9972
10013
  )
10014
+ ),
10015
+ _this2.props.showPublished && row.published && React__default.createElement(
10016
+ Card.Subtitle,
10017
+ { style: { marginTop: 0 } },
10018
+ moment(row.published).format('MMMM DD, YYYY')
10019
+ ),
10020
+ _this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 && row.authorMapping.map(function (authorDetail, index$$1) {
10021
+ return _this2.renderAuthor(authorDetail, index$$1, row.authorMapping.length);
10022
+ }),
10023
+ React__default.createElement(
10024
+ Card.Text,
10025
+ null,
10026
+ row.summary
9973
10027
  )
9974
10028
  )
9975
10029
  )
@@ -10020,18 +10074,21 @@ var GridContent = function (_React$Component) {
10020
10074
  Card.Title,
10021
10075
  null,
10022
10076
  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
10077
  )
10034
10078
  )
10079
+ ),
10080
+ _this2.props.showPublished && row.published && React__default.createElement(
10081
+ Card.Subtitle,
10082
+ { style: { marginTop: 0 } },
10083
+ moment(row.published).format('MMMM DD, YYYY')
10084
+ ),
10085
+ _this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 && row.authorMapping.map(function (authorDetail, index$$1) {
10086
+ return _this2.renderAuthor(authorDetail, index$$1, row.authorMapping.length);
10087
+ }),
10088
+ React__default.createElement(
10089
+ Card.Text,
10090
+ { className: index$$1 === 0 || index$$1 % 4 === 0 ? '' : 'card-subtext' },
10091
+ row.summary
10035
10092
  )
10036
10093
  )
10037
10094
  )
@@ -11006,29 +11063,51 @@ var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pagevi
11006
11063
  }
11007
11064
  };
11008
11065
 
11009
- var renderAuthor = function renderAuthor(authorName, authorURL, index$$1, length) {
11010
- if (authorName && authorURL) {
11066
+ var renderAuthor = function renderAuthor(authorDetail, index$$1, length) {
11067
+ var _id = authorDetail._id,
11068
+ displayName = authorDetail.displayName,
11069
+ url = authorDetail.url;
11070
+
11071
+ if (displayName && url && url.current) {
11011
11072
  return React__default.createElement(
11012
- Link,
11013
- { href: '/authors/' + authorURL.current, key: index$$1 },
11073
+ 'div',
11074
+ { key: _id },
11075
+ index$$1 === 0 && React__default.createElement(
11076
+ 'span',
11077
+ { className: 'pr-1' },
11078
+ 'By'
11079
+ ),
11014
11080
  React__default.createElement(
11015
- 'a',
11016
- null,
11017
- authorName,
11018
- length !== index$$1 + 1 && ' | '
11081
+ Link,
11082
+ { href: '/authors/[url]', as: '/authors/' + url.current },
11083
+ React__default.createElement(
11084
+ 'a',
11085
+ { className: 'text-muted' },
11086
+ displayName,
11087
+ length !== index$$1 + 1 && React__default.createElement('br', null)
11088
+ )
11019
11089
  )
11020
11090
  );
11021
- } else if (authorName) {
11091
+ } else if (displayName) {
11022
11092
  return React__default.createElement(
11023
- 'span',
11024
- { key: index$$1 },
11025
- authorName,
11026
- length !== index$$1 + 1 && ' | '
11093
+ 'div',
11094
+ { key: _id },
11095
+ index$$1 === 0 && React__default.createElement(
11096
+ 'span',
11097
+ { className: 'pr-1' },
11098
+ 'By'
11099
+ ),
11100
+ React__default.createElement(
11101
+ 'span',
11102
+ { className: 'text-muted' },
11103
+ displayName,
11104
+ length !== index$$1 + 1 && React__default.createElement('br', null)
11105
+ )
11027
11106
  );
11028
11107
  }
11029
11108
  };
11030
11109
 
11031
- var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage) {
11110
+ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor) {
11032
11111
  return React__default.createElement(
11033
11112
  'div',
11034
11113
  null,
@@ -11082,12 +11161,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
11082
11161
  { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
11083
11162
  moment(article.published).format('MMMM DD, YYYY')
11084
11163
  ),
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
- );
11164
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index$$1) {
11165
+ return renderAuthor(authorDetail, index$$1, article.authorMapping.length);
11091
11166
  }),
11092
11167
  article.summary && React__default.createElement(
11093
11168
  'p',
@@ -11139,7 +11214,8 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11139
11214
  mapping = props.mapping,
11140
11215
  seoPaginate = props.seoPaginate,
11141
11216
  pageview = props.pageview,
11142
- defaultImage = props.defaultImage;
11217
+ defaultImage = props.defaultImage,
11218
+ showAuthor = props.showAuthor;
11143
11219
  var initialCurrentPage = props.currentPage,
11144
11220
  showPublished = props.showPublished;
11145
11221
 
@@ -11156,9 +11232,8 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11156
11232
  setScrolling = _useState4[1];
11157
11233
 
11158
11234
  var _useState5 = useState(params ? params.to : 0),
11159
- _useState6 = slicedToArray(_useState5, 2),
11160
- per = _useState6[0],
11161
- setPer = _useState6[1];
11235
+ _useState6 = slicedToArray(_useState5, 1),
11236
+ per = _useState6[0];
11162
11237
 
11163
11238
  var _useState7 = useState(initialCurrentPage || 1),
11164
11239
  _useState8 = slicedToArray(_useState7, 2),
@@ -11198,7 +11273,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11198
11273
  React__default.createElement(
11199
11274
  Container$1,
11200
11275
  null,
11201
- cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage)
11276
+ cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor)
11202
11277
  )
11203
11278
  ),
11204
11279
  React__default.createElement(
@@ -11212,7 +11287,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
11212
11287
  React__default.createElement(
11213
11288
  Container$1,
11214
11289
  null,
11215
- cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage)
11290
+ cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor)
11216
11291
  ),
11217
11292
  React__default.createElement(
11218
11293
  'div',
@@ -11258,8 +11333,8 @@ var VideoSeriesListing = function (_React$Component) {
11258
11333
  args[_key] = arguments[_key];
11259
11334
  }
11260
11335
 
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,
11336
+ 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 = {
11337
+ data: _this.dataArr,
11263
11338
  per: _this.params ? _this.params.to : 2,
11264
11339
  page: _this.props.currentPage || 1,
11265
11340
  from: _this.params ? _this.params.from : 0,
@@ -11307,8 +11382,10 @@ var VideoSeriesListing = function (_React$Component) {
11307
11382
 
11308
11383
  _this.setState(function () {
11309
11384
  if (dataArr.length > 0) {
11385
+ var newDataArr = _this.state.data;
11386
+ newDataArr.push(dataArr);
11310
11387
  return {
11311
- data: [].concat(toConsumableArray(data), toConsumableArray(dataArr)),
11388
+ data: newDataArr,
11312
11389
  scrolling: true
11313
11390
  };
11314
11391
  } else {
@@ -11393,44 +11470,72 @@ var VideoSeriesListing = function (_React$Component) {
11393
11470
  'Next >>'
11394
11471
  )
11395
11472
  );
11473
+ }, _this.renderSeries = function (seriesData) {
11474
+ var itemCounter = 0;
11475
+
11476
+ return React__default.createElement(
11477
+ 'div',
11478
+ null,
11479
+ seriesData && seriesData.map(function (docSeries, index$$1) {
11480
+ docSeries.body[0].videos.map(function (singleVideo, indexInner) {
11481
+ singleVideo.link = '/view/' + docSeries.url.current + '?seriesVid=' + (indexInner + 1);
11482
+ });
11483
+ return React__default.createElement(
11484
+ 'div',
11485
+ { key: index$$1, counter: itemCounter++ },
11486
+ React__default.createElement(
11487
+ 'h4',
11488
+ { className: 'video-title-banner', style: { fontWeight: 'bold', color: 'var(--primary)', padding: '.25rem 0', borderBottom: '2px solid var(--gold)' } },
11489
+ React__default.createElement(
11490
+ Link,
11491
+ { href: '/' + _this.props.page + '/' + docSeries.url.current },
11492
+ React__default.createElement(
11493
+ 'a',
11494
+ null,
11495
+ docSeries.title,
11496
+ React__default.createElement(
11497
+ 'span',
11498
+ { style: { fontSize: '.9rem', color: 'grey', marginLeft: '1rem' } },
11499
+ 'View Topic'
11500
+ )
11501
+ )
11502
+ )
11503
+ ),
11504
+ React__default.createElement(YoutubeGroup, { key: index$$1, dataset: docSeries.body[0].videos })
11505
+ );
11506
+ })
11507
+ );
11396
11508
  }, _temp), possibleConstructorReturn(_this, _ret);
11397
11509
  }
11398
11510
 
11399
11511
  createClass(VideoSeriesListing, [{
11400
11512
  key: 'render',
11401
11513
  value: function render() {
11514
+ var _this2 = this;
11515
+
11402
11516
  return React__default.createElement(
11403
11517
  InfiniteScroll,
11404
11518
  { dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling, scrollThreshold: 0.9 },
11405
11519
  React__default.createElement(
11406
11520
  Container,
11407
11521
  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
- });
11522
+ this.state.data && this.state.data.map(function (series, index$$1) {
11523
+ var page = series[0].pageNumber !== 1 ? series[0].pageNumber : index$$1 + 1;
11524
+
11412
11525
  return React__default.createElement(
11413
- 'div',
11414
- null,
11526
+ VisibilitySensor,
11527
+ {
11528
+ partialVisibility: true,
11529
+ offset: { bottom: 400, top: 200 },
11530
+ key: index$$1,
11531
+ onChange: function onChange(isVisible) {
11532
+ isVisible && _this2.changePageNumber(page);
11533
+ } },
11415
11534
  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 })
11535
+ 'div',
11536
+ null,
11537
+ _this2.renderSeries(series)
11538
+ )
11434
11539
  );
11435
11540
  })
11436
11541
  )
@@ -11788,6 +11893,10 @@ function IconBase(props) {
11788
11893
  }
11789
11894
 
11790
11895
  // THIS FILE IS AUTO GENERATED
11896
+ var IoIosHome = function (props) {
11897
+ 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);
11898
+ };
11899
+ IoIosHome.displayName = "IoIosHome";
11791
11900
  var IoMdArrowDropdown = function (props) {
11792
11901
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M128 192l128 128 128-128z"}}]})(props);
11793
11902
  };
@@ -12079,6 +12188,31 @@ var NavMagazine = function NavMagazine(props) {
12079
12188
  subNav = props.subNav,
12080
12189
  website = props.website;
12081
12190
 
12191
+ var navRef = useRef(null);
12192
+
12193
+ var _useState = useState(false),
12194
+ _useState2 = slicedToArray(_useState, 2),
12195
+ isSticky = _useState2[0],
12196
+ setIsSticky = _useState2[1];
12197
+
12198
+ useEffect(function () {
12199
+ document.addEventListener('scroll', trackScrolling);
12200
+ return function () {
12201
+ document.removeEventListener('scroll', trackScrolling);
12202
+ };
12203
+ // eslint-disable-next-line react-hooks/exhaustive-deps
12204
+ }, []);
12205
+
12206
+ var trackScrolling = function trackScrolling() {
12207
+ var offsetTop = navRef.current.getBoundingClientRect().top;
12208
+
12209
+ if (offsetTop === 0) {
12210
+ setIsSticky(true);
12211
+ } else {
12212
+ setIsSticky(false);
12213
+ }
12214
+ };
12215
+
12082
12216
  return React__default.createElement(
12083
12217
  React__default.Fragment,
12084
12218
  null,
@@ -12111,7 +12245,7 @@ var NavMagazine = function NavMagazine(props) {
12111
12245
  ),
12112
12246
  React__default.createElement(
12113
12247
  Navbar,
12114
- { className: 'bottom-nav', variant: 'dark', expand: 'lg', bg: 'primary', sticky: 'top' },
12248
+ { className: 'bottom-nav', variant: 'dark', expand: 'lg', bg: 'primary', sticky: 'top', ref: navRef },
12115
12249
  React__default.createElement(
12116
12250
  Container,
12117
12251
  { className: 'mobile-nav' },
@@ -12119,6 +12253,15 @@ var NavMagazine = function NavMagazine(props) {
12119
12253
  React__default.createElement(
12120
12254
  Navbar.Collapse,
12121
12255
  { id: 'basic-navbar-nav' },
12256
+ isSticky && React__default.createElement(
12257
+ Link,
12258
+ { href: '/' },
12259
+ React__default.createElement(
12260
+ 'a',
12261
+ null,
12262
+ React__default.createElement(IoIosHome, { size: 20, className: 'sticky-home', color: '#fff' })
12263
+ )
12264
+ ),
12122
12265
  React__default.createElement(
12123
12266
  Nav,
12124
12267
  { className: 'mr-auto' },
@@ -12201,6 +12344,48 @@ var NavMagazine = function NavMagazine(props) {
12201
12344
  })
12202
12345
  )
12203
12346
  ),
12347
+ React__default.createElement(
12348
+ Navbar.Collapse,
12349
+ { id: 'basic-navbar-nav' },
12350
+ React__default.createElement(
12351
+ Nav,
12352
+ { className: 'mr-auto' },
12353
+ dataObject && dataObject.map(function (row, index) {
12354
+ if (row.subQuery && row.subQuery.length > 0) {
12355
+ return row.name ? React__default.createElement(
12356
+ NavDropdown,
12357
+ { key: index, title: row.name, id: 'basic-nav-dropdown' },
12358
+ row.subQuery && row.subQuery.map(function (ddRow, subIndex) {
12359
+ if (ddRow.type === 'divider') {
12360
+ return React__default.createElement(NavDropdown.Divider, { key: subIndex });
12361
+ } else {
12362
+ return ddRow.url && ddRow.name ? React__default.createElement(
12363
+ Link,
12364
+ { key: subIndex, href: ddRow.url },
12365
+ React__default.createElement(
12366
+ 'a',
12367
+ { target: ddRow.blank ? '_blank' : '_self', className: 'dropdown-item' },
12368
+ ddRow.name
12369
+ )
12370
+ ) : null;
12371
+ }
12372
+ })
12373
+ ) : null;
12374
+ } else {
12375
+ return row.url && row.name ? React__default.createElement(
12376
+ Link,
12377
+ { key: index, href: row.url },
12378
+ React__default.createElement(
12379
+ 'a',
12380
+ { target: row.blank ? '_blank' : '_self', className: 'nav-link' },
12381
+ row.name
12382
+ )
12383
+ ) : null;
12384
+ }
12385
+ })
12386
+ ),
12387
+ React__default.createElement(Search, { device: 'mobile' })
12388
+ ),
12204
12389
  website && React__default.createElement(
12205
12390
  Navbar.Collapse,
12206
12391
  { id: 'basic-navbar-sub' },
@@ -12215,7 +12400,7 @@ var NavMagazine = function NavMagazine(props) {
12215
12400
  React__default.createElement(
12216
12401
  'style',
12217
12402
  { 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 '
12403
+ '\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
12404
  )
12220
12405
  );
12221
12406
  };
@@ -13605,26 +13790,38 @@ var AD300x250x600 = function AD300x250x600(_ref) {
13605
13790
  });
13606
13791
  };
13607
13792
 
13793
+ var urlFor$1 = function urlFor(source, client) {
13794
+ var builder = imageUrlBuilder(client);
13795
+ return builder.image(source);
13796
+ };
13797
+
13608
13798
  var FigureComponent = function FigureComponent(_ref) {
13609
13799
  var node$$1 = _ref.node,
13610
13800
  client = _ref.client;
13801
+
13802
+ var imgElement = useRef(null);
13803
+
13804
+ var _useState = useState(null),
13805
+ _useState2 = slicedToArray(_useState, 2),
13806
+ captionWidth = _useState2[0],
13807
+ setcaptionWidth = _useState2[1];
13808
+
13809
+ var _useState3 = useState(''),
13810
+ _useState4 = slicedToArray(_useState3, 2),
13811
+ imgFloat = _useState4[0],
13812
+ setimgFloat = _useState4[1];
13813
+
13611
13814
  var caption = node$$1.caption,
13612
- asset = node$$1.asset,
13613
13815
  alt = node$$1.alt,
13614
13816
  blank = node$$1.blank,
13615
13817
  link = node$$1.link,
13616
- _node$widthP = node$$1.widthP,
13617
- widthP = _node$widthP === undefined ? '100' : _node$widthP,
13818
+ widthP = node$$1.widthP,
13618
13819
  _node$alignment = node$$1.alignment,
13619
13820
  alignment = _node$alignment === undefined ? 'center' : _node$alignment;
13620
13821
 
13621
- var builder = imageUrlBuilder(client);
13622
13822
 
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();
13823
+ var imgWidth = widthP ? widthP + '%' : 'auto';
13824
+
13628
13825
  var figureMargin = void 0;
13629
13826
  if (imgFloat === 'none') {
13630
13827
  figureMargin = '0 auto 1rem';
@@ -13635,32 +13832,47 @@ var FigureComponent = function FigureComponent(_ref) {
13635
13832
  if (imgFloat === 'right') {
13636
13833
  figureMargin = '0 10% 1rem 1rem';
13637
13834
  }
13835
+
13836
+ var loadImg = function loadImg() {
13837
+ setcaptionWidth(imgElement.current.naturalWidth);
13838
+ };
13839
+
13840
+ useEffect(function () {
13841
+ var screenWidth = window.innerWidth;
13842
+ if (screenWidth > 1000) {
13843
+ var align = alignment.toLowerCase() === 'center' ? 'none' : alignment.toLowerCase();
13844
+ setimgFloat(align);
13845
+ loadImg();
13846
+ }
13847
+ // eslint-disable-next-line react-hooks/exhaustive-deps
13848
+ }, []);
13849
+
13638
13850
  return React__default.createElement(
13639
13851
  Figure,
13640
- { className: 'd-block text-center mb-3', style: { width: imgWidth, float: imgFloat, margin: figureMargin } },
13852
+ { className: 'd-block text-center mb-3', style: { width: imgWidth, clear: 'both', float: imgFloat, margin: figureMargin } },
13641
13853
  link ? React__default.createElement(
13642
13854
  'a',
13643
13855
  { href: link, target: blank ? '_blank' : '_self' },
13644
- React__default.createElement(Figure.Image, { src: urlFor(node$$1).url(), alt: alt && alt }),
13856
+ React__default.createElement(Figure.Image, { ref: imgElement, onLoad: loadImg, src: urlFor$1(node$$1, client).url(), alt: alt && alt }),
13645
13857
  caption && React__default.createElement(
13646
13858
  Figure.Caption,
13647
- null,
13859
+ { style: { width: captionWidth } },
13648
13860
  caption
13649
13861
  )
13650
13862
  ) : React__default.createElement(
13651
13863
  React__default.Fragment,
13652
13864
  null,
13653
- React__default.createElement(Figure.Image, { src: urlFor(node$$1).url(), alt: alt && alt }),
13865
+ React__default.createElement(Figure.Image, { ref: imgElement, onLoad: loadImg, src: urlFor$1(node$$1, client).url(), alt: alt && alt }),
13654
13866
  caption && React__default.createElement(
13655
13867
  Figure.Caption,
13656
- null,
13868
+ { style: { width: captionWidth } },
13657
13869
  caption
13658
13870
  )
13659
13871
  )
13660
13872
  );
13661
13873
  };
13662
13874
 
13663
- var urlFor$1 = function urlFor(source, builder) {
13875
+ var urlFor$2 = function urlFor(source, builder) {
13664
13876
  return builder.image(source);
13665
13877
  };
13666
13878
 
@@ -13696,7 +13908,7 @@ var Slideshow = function Slideshow(_ref) {
13696
13908
  return React__default.createElement(
13697
13909
  Carousel.Item,
13698
13910
  { 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%' } }),
13911
+ React__default.createElement('img', { src: slide.asset && urlFor$2(slide.asset, builder).url(), alt: slide.alt && slide.alt, style: { width: '100%' } }),
13700
13912
  slide.caption && React__default.createElement(
13701
13913
  'p',
13702
13914
  { className: 'p-2' },
@@ -19586,7 +19798,9 @@ var Video = function Video(_ref) {
19586
19798
  var source = node.source,
19587
19799
  videoID = node.videoID;
19588
19800
 
19589
- if (source === 'brightcove' && accountIDs.brightcove) return React__default.createElement(ReactPlayerLoader, { accountId: accountIDs.brightcove, videoId: videoID, attrs: { className: 'brightcove' } });
19801
+ if (source === 'brightcove' && accountIDs.brightcove) {
19802
+ return React__default.createElement(ReactPlayerLoader, { accountId: accountIDs.brightcove.accountId, videoId: videoID, playerId: accountIDs.brightcove.playerId, attrs: { className: 'brightcove' } });
19803
+ }
19590
19804
  // TODO - add players for other video types
19591
19805
  return null;
19592
19806
  };
@@ -19807,7 +20021,7 @@ var Poll = function Poll(_ref) {
19807
20021
  response = node.response;
19808
20022
 
19809
20023
 
19810
- var choicesTotolCount = choices && choices.reduce(function (acc, choice) {
20024
+ var choicesTotalCount = choices && choices.reduce(function (acc, choice) {
19811
20025
  acc = acc + parseInt(choice.choiceCount);
19812
20026
  return acc;
19813
20027
  }, 0);
@@ -19848,7 +20062,7 @@ var Poll = function Poll(_ref) {
19848
20062
  'div',
19849
20063
  { className: 'progress-container' },
19850
20064
  showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
19851
- var percentage = Math.floor(choice.choiceCount * 100 / choicesTotolCount);
20065
+ var percentage = choicesTotalCount && choicesTotalCount > 0 ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0;
19852
20066
  return React__default.createElement(
19853
20067
  'div',
19854
20068
  { key: choice._key, className: 'mb-3' },
@@ -19857,16 +20071,24 @@ var Poll = function Poll(_ref) {
19857
20071
  null,
19858
20072
  choice.choiceText
19859
20073
  ),
19860
- React__default.createElement(ProgressBar, { now: percentage, label: percentage + '%' }),
20074
+ React__default.createElement(ProgressBar, { now: percentage }),
19861
20075
  React__default.createElement(
19862
20076
  'span',
19863
20077
  { className: 'float-right' },
20078
+ percentage,
20079
+ '% (',
19864
20080
  choice.choiceCount,
19865
- ' Votes'
20081
+ ' Votes)'
19866
20082
  )
19867
20083
  );
19868
20084
  })
19869
20085
  ),
20086
+ showAnswer && React__default.createElement(
20087
+ 'h4',
20088
+ { className: 'text-center small p-3' },
20089
+ 'Total Votes: ',
20090
+ choicesTotalCount
20091
+ ),
19870
20092
  showAnswer && response && React__default.createElement(BlockContent, { blocks: response }),
19871
20093
  React__default.createElement(
19872
20094
  'style',
@@ -19988,7 +20210,7 @@ var Feature = function Feature(props) {
19988
20210
  null,
19989
20211
  React__default.createElement(
19990
20212
  Carousel$1,
19991
- null,
20213
+ { touch: true },
19992
20214
  dataset.map(function (feature, index) {
19993
20215
  var feature_title = feature.feature_title,
19994
20216
  feature_body = feature.feature_body,
@@ -20072,7 +20294,56 @@ var Breadcrumbs = function Breadcrumbs() {
20072
20294
  );
20073
20295
  };
20074
20296
 
20075
- var urlFor$2 = function urlFor(source, client) {
20297
+ var SetCookie = function SetCookie(key, value) {
20298
+ cookie.set(key, value, { expires: 1, sameSite: 'none', secure: true });
20299
+ };
20300
+
20301
+ var BreadcrumbsExtended = function BreadcrumbsExtended(_ref) {
20302
+ var childLinks = _ref.childLinks,
20303
+ parentTaxonomy = _ref.parentTaxonomy;
20304
+
20305
+ if (childLinks && childLinks.length > 0) {
20306
+ return React__default.createElement(
20307
+ Breadcrumb,
20308
+ null,
20309
+ childLinks.map(function (item, index) {
20310
+ return React__default.createElement(
20311
+ Breadcrumb.Item,
20312
+ { href: '/' + item.url, key: index },
20313
+ item.name
20314
+ );
20315
+ }),
20316
+ React__default.createElement(
20317
+ 'style',
20318
+ { jsx: true },
20319
+ '\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 '
20320
+ )
20321
+ );
20322
+ } else if (parentTaxonomy.identifier && parentTaxonomy.name) {
20323
+ return React__default.createElement(
20324
+ Breadcrumb,
20325
+ null,
20326
+ React__default.createElement(
20327
+ Breadcrumb.Item,
20328
+ { href: '/' },
20329
+ 'home'
20330
+ ),
20331
+ React__default.createElement(
20332
+ Breadcrumb.Item,
20333
+ { href: '/' + parentTaxonomy.identifier },
20334
+ parentTaxonomy.name
20335
+ ),
20336
+ React__default.createElement(
20337
+ 'style',
20338
+ { jsx: true },
20339
+ '\n ol.breadcrumb {\n background: transparent;\n padding-left: 0.25rem;\n }\n '
20340
+ )
20341
+ );
20342
+ }
20343
+ return null;
20344
+ };
20345
+
20346
+ var urlFor$3 = function urlFor(source, client) {
20076
20347
  var builder = imageUrlBuilder(client);
20077
20348
  return builder.image(source);
20078
20349
  };
@@ -20099,7 +20370,7 @@ var Hero = function Hero(_ref) {
20099
20370
  { className: 'h4' },
20100
20371
  title
20101
20372
  ),
20102
- thumbnail && React__default.createElement(Card$1.Img, { src: urlFor$2(thumbnail, client).url() }),
20373
+ thumbnail && React__default.createElement(Card$1.Img, { src: urlFor$3(thumbnail, client).url() }),
20103
20374
  summary && React__default.createElement(
20104
20375
  Card$1.Footer,
20105
20376
  { className: 'h6' },
@@ -20110,5 +20381,5 @@ var Hero = function Hero(_ref) {
20110
20381
  );
20111
20382
  };
20112
20383
 
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 };
20384
+ 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
20385
  //# sourceMappingURL=index.es.js.map