@mjhls/mjh-framework 1.0.659 → 1.0.661

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/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- # mjh-framework v. 1.0.659
2
+ # mjh-framework v. 1.0.661
3
3
 
4
4
  > Foundation Framework
5
5
 
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4
+
5
+ require('./_commonjsHelpers-06173234.js');
6
+ require('./_to-object-329a650b.js');
7
+ require('./es6.string.iterator-cc0bbaa4.js');
8
+ require('./_library-dd23b178.js');
9
+ require('./core.get-iterator-method-f62321d4.js');
10
+ require('./_object-pie-68c5bcbc.js');
11
+ var _extends = require('./extends-60837c34.js');
12
+ require('./web.dom.iterable-a0e279c1.js');
13
+ require('./typeof-725500bc.js');
14
+ require('./_is-array-754e012d.js');
15
+ var React = require('react');
16
+ var React__default = _interopDefault(React);
17
+ require('prop-types');
18
+ require('react-dom');
19
+ require('./index-b5eb3ff8.js');
20
+ require('./index-da796b8c.js');
21
+ require('./slicedToArray-8f385299.js');
22
+ require('./smoothscroll-95231a70.js');
23
+ var YoutubeGroup = require('./YoutubeGroup.js');
24
+
25
+ function ArticleCarousel(props) {
26
+ //Passed in array of articles to pass into YoutubeGroup
27
+ var articles = props.articles;
28
+
29
+ //Setup article.link URL
30
+
31
+ var data = articles.map(function (article, index) {
32
+ article.link = '/view/' + article.url.current;
33
+ return article;
34
+ });
35
+
36
+ return React__default.createElement(
37
+ React__default.Fragment,
38
+ null,
39
+ articles ? React__default.createElement(YoutubeGroup, _extends._extends({ key: 'articleCarousel-0', dataset: data }, props)) : React__default.createElement(
40
+ 'p',
41
+ null,
42
+ 'No Article Found.'
43
+ )
44
+ );
45
+ }
46
+
47
+ module.exports = ArticleCarousel;
@@ -45,7 +45,7 @@ require('./GroupDeck.js');
45
45
  require('react-bootstrap');
46
46
  var Button = _interopDefault(require('react-bootstrap/Button'));
47
47
  var index$3 = require('./index-5be2866f.js');
48
- var getSerializers = require('./index-47e709f6.js');
48
+ var getSerializers = require('./index-2831c002.js');
49
49
  require('./util-f2c1b65b.js');
50
50
  require('./brightcove-react-player-loader.es-156bd4d6.js');
51
51
  require('react-bootstrap/Pagination');
@@ -52,7 +52,7 @@ require('./GroupDeck.js');
52
52
  require('react-bootstrap');
53
53
  var QueueDeckExpanded = require('./QueueDeckExpanded.js');
54
54
  require('react-bootstrap/Button');
55
- var getSerializers = require('./index-47e709f6.js');
55
+ var getSerializers = require('./index-2831c002.js');
56
56
  require('./util-f2c1b65b.js');
57
57
  require('./brightcove-react-player-loader.es-156bd4d6.js');
58
58
  require('react-bootstrap/Pagination');
package/dist/cjs/View.js CHANGED
@@ -47,7 +47,7 @@ require('react-bootstrap');
47
47
  var Button = _interopDefault(require('react-bootstrap/Button'));
48
48
  var defineProperty$1 = require('./defineProperty-55548b25.js');
49
49
  var Form = _interopDefault(require('react-bootstrap/Form'));
50
- var getSerializers = require('./index-47e709f6.js');
50
+ var getSerializers = require('./index-2831c002.js');
51
51
  require('./util-f2c1b65b.js');
52
52
  require('./brightcove-react-player-loader.es-156bd4d6.js');
53
53
  require('react-bootstrap/Pagination');
@@ -40,7 +40,7 @@ require('./smoothscroll-95231a70.js');
40
40
  require('./GroupDeck.js');
41
41
  require('react-bootstrap');
42
42
  require('react-bootstrap/Button');
43
- var getSerializers = require('./index-47e709f6.js');
43
+ var getSerializers = require('./index-2831c002.js');
44
44
  require('./util-f2c1b65b.js');
45
45
  require('./brightcove-react-player-loader.es-156bd4d6.js');
46
46
  require('react-bootstrap/Pagination');
@@ -8391,29 +8391,31 @@ var ArticleSeries = function ArticleSeries(_ref) {
8391
8391
  );
8392
8392
  };
8393
8393
 
8394
- function useOutsideAlerter(ref, container, setOpenImg, setOpenImgSrc) {
8395
- React.useEffect(function () {
8396
- function handleClickOutside(event) {
8397
- if (ref.current && !ref.current.contains(event.target) && container.current && container.current.className.includes('open')) {
8398
- setOpenImgSrc('');
8399
- setOpenImg(false);
8400
- }
8394
+ var LightBox = function LightBox(_ref) {
8395
+ var showLightbox = _ref.showLightbox,
8396
+ lightboxImgSrc = _ref.lightboxImgSrc,
8397
+ closeLightbox = _ref.closeLightbox;
8398
+
8399
+ var lightboxImage = React.useRef(null);
8400
+ var lightboxContainer = React.useRef(null);
8401
+
8402
+ var handleClickOutside = React.useCallback(function (event) {
8403
+ if (lightboxImage.current && !lightboxImage.current.contains(event.target) && lightboxContainer.current && lightboxContainer.current.className.includes('open')) {
8404
+ closeLightbox();
8401
8405
  }
8406
+ }, [lightboxImage, lightboxContainer]);
8407
+
8408
+ React.useEffect(function () {
8402
8409
  document.addEventListener('mousedown', handleClickOutside);
8403
8410
  return function () {
8404
8411
  document.removeEventListener('mousedown', handleClickOutside);
8405
8412
  };
8406
- }, [ref]);
8407
- }
8413
+ }, [handleClickOutside]);
8408
8414
 
8409
- var renderLightbox = function renderLightbox(openImg, openImgSrc, setOpenImg, setOpenImgSrc) {
8410
- var lightboxImage = React.useRef(null);
8411
- var lightboxContainer = React.useRef(null);
8412
- useOutsideAlerter(lightboxImage, lightboxContainer, setOpenImg, setOpenImgSrc);
8413
8415
  return React__default.createElement(
8414
8416
  'div',
8415
- { ref: lightboxContainer, className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
8416
- React__default.createElement('img', { ref: lightboxImage, src: openImgSrc }),
8417
+ { ref: lightboxContainer, className: 'lightbox-target ' + (showLightbox ? 'open' : 'close') },
8418
+ React__default.createElement('img', { ref: lightboxImage, src: lightboxImgSrc }),
8417
8419
  React__default.createElement(
8418
8420
  'style',
8419
8421
  { jsx: 'true' },
@@ -8436,40 +8438,16 @@ var compareProps = function compareProps(prevProps, nextProps) {
8436
8438
  var FigureComponent = function FigureComponent(props) {
8437
8439
  var _useState = React.useState(false),
8438
8440
  _useState2 = slicedToArray._slicedToArray(_useState, 2),
8439
- openImg = _useState2[0],
8440
- setOpenImg = _useState2[1];
8441
+ showLightbox = _useState2[0],
8442
+ setShowLightbox = _useState2[1];
8441
8443
 
8442
8444
  var _useState3 = React.useState(''),
8443
8445
  _useState4 = slicedToArray._slicedToArray(_useState3, 2),
8444
- openImgSrc = _useState4[0],
8445
- setOpenImgSrc = _useState4[1];
8446
+ lightboxImgSrc = _useState4[0],
8447
+ setLightboxImgSrc = _useState4[1];
8446
8448
 
8447
8449
  if (typeof window === 'undefined') return null;
8448
8450
 
8449
- React.useEffect(function () {
8450
- var lightboxCaptions = document.querySelectorAll('.lightbox-caption');
8451
- if (lightboxCaptions && lightboxCaptions.length > 0) {
8452
- lightboxCaptions.forEach(function (mediaLink) {
8453
- var prevSibling = mediaLink.previousSibling;
8454
- if (prevSibling && prevSibling.textContent && prevSibling.textContent !== '') {
8455
- prevSibling.style.display = 'inline';
8456
- prevSibling.style.paddingRight = '0';
8457
- prevSibling.style.marginRight = '0';
8458
- }
8459
- var nextSibling = mediaLink.nextSibling;
8460
- nextSibling.remove();
8461
- var parentNode = mediaLink.parentNode;
8462
- parentNode.appendChild(nextSibling);
8463
- nextSibling = mediaLink.nextSibling;
8464
- if (nextSibling && nextSibling.textContent && nextSibling.textContent !== '') {
8465
- nextSibling.style.display = 'inline';
8466
- nextSibling.style.paddingLeft = '0';
8467
- nextSibling.style.marginLeft = '0';
8468
- }
8469
- });
8470
- }
8471
- }, []);
8472
-
8473
8451
  var node = props.node,
8474
8452
  client = props.client;
8475
8453
 
@@ -8485,9 +8463,7 @@ var FigureComponent = function FigureComponent(props) {
8485
8463
  _node$class_name = node.class_name,
8486
8464
  class_name = _node$class_name === undefined ? 'd-block' : _node$class_name,
8487
8465
  _node$disableTextWrap = node.disableTextWrap,
8488
- disableTextWrap = _node$disableTextWrap === undefined ? false : _node$disableTextWrap,
8489
- _node$lightBoxmode = node.lightBoxmode,
8490
- lightBoxmode = _node$lightBoxmode === undefined ? false : _node$lightBoxmode;
8466
+ disableTextWrap = _node$disableTextWrap === undefined ? false : _node$disableTextWrap;
8491
8467
  var _node$widthP = node.widthP,
8492
8468
  widthP = _node$widthP === undefined ? 'auto' : _node$widthP;
8493
8469
 
@@ -8538,31 +8514,6 @@ var FigureComponent = function FigureComponent(props) {
8538
8514
  margin: figureMargin
8539
8515
  };
8540
8516
 
8541
- if (lightBoxmode) {
8542
- if (link && caption) {
8543
- return React__default.createElement(
8544
- 'a',
8545
- { target: blank ? '_blank' : '_self', href: link },
8546
- React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
8547
- );
8548
- } else if (node && node.asset && node.asset._ref && caption) {
8549
- return React__default.createElement(
8550
- React__default.Fragment,
8551
- null,
8552
- React__default.createElement('div', {
8553
- style: { display: 'inline', cursor: 'pointer', textDecoration: 'underline', paddingLeft: '0.25rem', paddingRight: '0.25rem' },
8554
- className: 'lightbox-caption',
8555
- onClick: function onClick() {
8556
- setOpenImgSrc(urlFor$3(node, client).url());
8557
- setOpenImg(true);
8558
- },
8559
- dangerouslySetInnerHTML: { __html: '<span>' + caption + '</span>' }
8560
- }),
8561
- renderLightbox(openImg, openImgSrc, setOpenImg, setOpenImgSrc)
8562
- );
8563
- }
8564
- }
8565
-
8566
8517
  return React__default.createElement(
8567
8518
  React__default.Fragment,
8568
8519
  null,
@@ -8583,13 +8534,20 @@ var FigureComponent = function FigureComponent(props) {
8583
8534
  src: urlFor$3(node, client).url(),
8584
8535
  alt: alt && alt,
8585
8536
  onClick: function onClick() {
8586
- setOpenImgSrc(urlFor$3(node, client).url());
8587
- setOpenImg(true);
8537
+ setLightboxImgSrc(urlFor$3(node, client).url());
8538
+ setShowLightbox(true);
8588
8539
  }
8589
8540
  }),
8590
8541
  caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
8591
8542
  ),
8592
- renderLightbox(openImg, openImgSrc, setOpenImg, setOpenImgSrc)
8543
+ React__default.createElement(LightBox, {
8544
+ showLightbox: showLightbox,
8545
+ lightboxImgSrc: lightboxImgSrc,
8546
+ closeLightbox: function closeLightbox() {
8547
+ setLightboxImgSrc('');
8548
+ setShowLightbox(false);
8549
+ }
8550
+ })
8593
8551
  ),
8594
8552
  React__default.createElement(
8595
8553
  'style',
@@ -8606,7 +8564,7 @@ var urlFor$4 = function urlFor(source, client) {
8606
8564
  return builder.image(source).auto('format');
8607
8565
  };
8608
8566
 
8609
- function useOutsideAlerter$1(ref, container, setOpenImg, setOpenImgSrc) {
8567
+ function useOutsideAlerter(ref, container, setOpenImg, setOpenImgSrc) {
8610
8568
  React.useEffect(function () {
8611
8569
  function handleClickOutside(event) {
8612
8570
  if (ref.current && !ref.current.contains(event.target) && container.current && container.current.className.includes('open')) {
@@ -8637,7 +8595,7 @@ var MultiFigure = function MultiFigure(props) {
8637
8595
 
8638
8596
  var lightboxImage = React.useRef(null);
8639
8597
  var lightboxContainer = React.useRef(null);
8640
- useOutsideAlerter$1(lightboxImage, lightboxContainer, setOpenImg, setOpenImgSrc);
8598
+ useOutsideAlerter(lightboxImage, lightboxContainer, setOpenImg, setOpenImgSrc);
8641
8599
  if (images && images.length > 0) {
8642
8600
  return React__default.createElement(
8643
8601
  'div',
package/dist/cjs/index.js CHANGED
@@ -79,7 +79,7 @@ require('react-bootstrap/Form');
79
79
  require('./index-5be2866f.js');
80
80
  require('./js.cookie-a511c430.js');
81
81
  var CMEDeck = require('./CMEDeck.js');
82
- var getSerializers = require('./index-47e709f6.js');
82
+ var getSerializers = require('./index-2831c002.js');
83
83
  require('./util-f2c1b65b.js');
84
84
  require('./brightcove-react-player-loader.es-156bd4d6.js');
85
85
  require('react-bootstrap/Pagination');
@@ -0,0 +1,42 @@
1
+ import './_commonjsHelpers-0c4b6f40.js';
2
+ import './_to-object-ded78eb9.js';
3
+ import './es6.string.iterator-9b2af4a5.js';
4
+ import './_library-528f1934.js';
5
+ import './core.get-iterator-method-54d2e411.js';
6
+ import './_object-pie-71ac75a4.js';
7
+ import { _ as _extends } from './extends-cc5da797.js';
8
+ import './web.dom.iterable-8956f9a5.js';
9
+ import './typeof-08f2c380.js';
10
+ import './_is-array-49698029.js';
11
+ import React__default from 'react';
12
+ import 'prop-types';
13
+ import 'react-dom';
14
+ import './index-51a80699.js';
15
+ import './index-5f9f807a.js';
16
+ import './slicedToArray-7021e5df.js';
17
+ import './smoothscroll-4b699764.js';
18
+ import YoutubeGroup from './YoutubeGroup.js';
19
+
20
+ function ArticleCarousel(props) {
21
+ //Passed in array of articles to pass into YoutubeGroup
22
+ var articles = props.articles;
23
+
24
+ //Setup article.link URL
25
+
26
+ var data = articles.map(function (article, index) {
27
+ article.link = '/view/' + article.url.current;
28
+ return article;
29
+ });
30
+
31
+ return React__default.createElement(
32
+ React__default.Fragment,
33
+ null,
34
+ articles ? React__default.createElement(YoutubeGroup, _extends({ key: 'articleCarousel-0', dataset: data }, props)) : React__default.createElement(
35
+ 'p',
36
+ null,
37
+ 'No Article Found.'
38
+ )
39
+ );
40
+ }
41
+
42
+ export default ArticleCarousel;
@@ -39,7 +39,7 @@ import './GroupDeck.js';
39
39
  import 'react-bootstrap';
40
40
  import Button from 'react-bootstrap/Button';
41
41
  import { m as momentTimezone } from './index-d2f90501.js';
42
- import { g as getSerializers } from './index-ed279e5e.js';
42
+ import { g as getSerializers } from './index-e2a6c2d0.js';
43
43
  import './util-7700fc59.js';
44
44
  import './brightcove-react-player-loader.es-83f53e4e.js';
45
45
  import 'react-bootstrap/Pagination';
@@ -47,7 +47,7 @@ import './GroupDeck.js';
47
47
  import 'react-bootstrap';
48
48
  import QueueDeckExpanded from './QueueDeckExpanded.js';
49
49
  import 'react-bootstrap/Button';
50
- import { g as getSerializers } from './index-ed279e5e.js';
50
+ import { g as getSerializers } from './index-e2a6c2d0.js';
51
51
  import './util-7700fc59.js';
52
52
  import './brightcove-react-player-loader.es-83f53e4e.js';
53
53
  import 'react-bootstrap/Pagination';
package/dist/esm/View.js CHANGED
@@ -41,7 +41,7 @@ import 'react-bootstrap';
41
41
  import Button from 'react-bootstrap/Button';
42
42
  import { _ as _defineProperty } from './defineProperty-b798470d.js';
43
43
  import Form from 'react-bootstrap/Form';
44
- import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-ed279e5e.js';
44
+ import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-e2a6c2d0.js';
45
45
  import './util-7700fc59.js';
46
46
  import './brightcove-react-player-loader.es-83f53e4e.js';
47
47
  import 'react-bootstrap/Pagination';
@@ -38,7 +38,7 @@ import './smoothscroll-4b699764.js';
38
38
  import './GroupDeck.js';
39
39
  import 'react-bootstrap';
40
40
  import 'react-bootstrap/Button';
41
- export { g as default } from './index-ed279e5e.js';
41
+ export { g as default } from './index-e2a6c2d0.js';
42
42
  import './util-7700fc59.js';
43
43
  import './brightcove-react-player-loader.es-83f53e4e.js';
44
44
  import 'react-bootstrap/Pagination';
@@ -3,7 +3,7 @@ import { a as _Array$from, _ as _toConsumableArray } from './toConsumableArray-7
3
3
  import { _ as _extends } from './extends-cc5da797.js';
4
4
  import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-7ee3e0c1.js';
5
5
  import { _ as _typeof$1 } from './typeof-08f2c380.js';
6
- import React__default, { useState, useEffect, useRef } from 'react';
6
+ import React__default, { useState, useEffect, useRef, useCallback } from 'react';
7
7
  import { l as lib_3 } from './index-93ec3c59.js';
8
8
  import PropTypes from 'prop-types';
9
9
  import Row from 'react-bootstrap/Row';
@@ -8384,29 +8384,31 @@ var ArticleSeries = function ArticleSeries(_ref) {
8384
8384
  );
8385
8385
  };
8386
8386
 
8387
- function useOutsideAlerter(ref, container, setOpenImg, setOpenImgSrc) {
8388
- useEffect(function () {
8389
- function handleClickOutside(event) {
8390
- if (ref.current && !ref.current.contains(event.target) && container.current && container.current.className.includes('open')) {
8391
- setOpenImgSrc('');
8392
- setOpenImg(false);
8393
- }
8387
+ var LightBox = function LightBox(_ref) {
8388
+ var showLightbox = _ref.showLightbox,
8389
+ lightboxImgSrc = _ref.lightboxImgSrc,
8390
+ closeLightbox = _ref.closeLightbox;
8391
+
8392
+ var lightboxImage = useRef(null);
8393
+ var lightboxContainer = useRef(null);
8394
+
8395
+ var handleClickOutside = useCallback(function (event) {
8396
+ if (lightboxImage.current && !lightboxImage.current.contains(event.target) && lightboxContainer.current && lightboxContainer.current.className.includes('open')) {
8397
+ closeLightbox();
8394
8398
  }
8399
+ }, [lightboxImage, lightboxContainer]);
8400
+
8401
+ useEffect(function () {
8395
8402
  document.addEventListener('mousedown', handleClickOutside);
8396
8403
  return function () {
8397
8404
  document.removeEventListener('mousedown', handleClickOutside);
8398
8405
  };
8399
- }, [ref]);
8400
- }
8406
+ }, [handleClickOutside]);
8401
8407
 
8402
- var renderLightbox = function renderLightbox(openImg, openImgSrc, setOpenImg, setOpenImgSrc) {
8403
- var lightboxImage = useRef(null);
8404
- var lightboxContainer = useRef(null);
8405
- useOutsideAlerter(lightboxImage, lightboxContainer, setOpenImg, setOpenImgSrc);
8406
8408
  return React__default.createElement(
8407
8409
  'div',
8408
- { ref: lightboxContainer, className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
8409
- React__default.createElement('img', { ref: lightboxImage, src: openImgSrc }),
8410
+ { ref: lightboxContainer, className: 'lightbox-target ' + (showLightbox ? 'open' : 'close') },
8411
+ React__default.createElement('img', { ref: lightboxImage, src: lightboxImgSrc }),
8410
8412
  React__default.createElement(
8411
8413
  'style',
8412
8414
  { jsx: 'true' },
@@ -8429,40 +8431,16 @@ var compareProps = function compareProps(prevProps, nextProps) {
8429
8431
  var FigureComponent = function FigureComponent(props) {
8430
8432
  var _useState = useState(false),
8431
8433
  _useState2 = _slicedToArray(_useState, 2),
8432
- openImg = _useState2[0],
8433
- setOpenImg = _useState2[1];
8434
+ showLightbox = _useState2[0],
8435
+ setShowLightbox = _useState2[1];
8434
8436
 
8435
8437
  var _useState3 = useState(''),
8436
8438
  _useState4 = _slicedToArray(_useState3, 2),
8437
- openImgSrc = _useState4[0],
8438
- setOpenImgSrc = _useState4[1];
8439
+ lightboxImgSrc = _useState4[0],
8440
+ setLightboxImgSrc = _useState4[1];
8439
8441
 
8440
8442
  if (typeof window === 'undefined') return null;
8441
8443
 
8442
- useEffect(function () {
8443
- var lightboxCaptions = document.querySelectorAll('.lightbox-caption');
8444
- if (lightboxCaptions && lightboxCaptions.length > 0) {
8445
- lightboxCaptions.forEach(function (mediaLink) {
8446
- var prevSibling = mediaLink.previousSibling;
8447
- if (prevSibling && prevSibling.textContent && prevSibling.textContent !== '') {
8448
- prevSibling.style.display = 'inline';
8449
- prevSibling.style.paddingRight = '0';
8450
- prevSibling.style.marginRight = '0';
8451
- }
8452
- var nextSibling = mediaLink.nextSibling;
8453
- nextSibling.remove();
8454
- var parentNode = mediaLink.parentNode;
8455
- parentNode.appendChild(nextSibling);
8456
- nextSibling = mediaLink.nextSibling;
8457
- if (nextSibling && nextSibling.textContent && nextSibling.textContent !== '') {
8458
- nextSibling.style.display = 'inline';
8459
- nextSibling.style.paddingLeft = '0';
8460
- nextSibling.style.marginLeft = '0';
8461
- }
8462
- });
8463
- }
8464
- }, []);
8465
-
8466
8444
  var node = props.node,
8467
8445
  client = props.client;
8468
8446
 
@@ -8478,9 +8456,7 @@ var FigureComponent = function FigureComponent(props) {
8478
8456
  _node$class_name = node.class_name,
8479
8457
  class_name = _node$class_name === undefined ? 'd-block' : _node$class_name,
8480
8458
  _node$disableTextWrap = node.disableTextWrap,
8481
- disableTextWrap = _node$disableTextWrap === undefined ? false : _node$disableTextWrap,
8482
- _node$lightBoxmode = node.lightBoxmode,
8483
- lightBoxmode = _node$lightBoxmode === undefined ? false : _node$lightBoxmode;
8459
+ disableTextWrap = _node$disableTextWrap === undefined ? false : _node$disableTextWrap;
8484
8460
  var _node$widthP = node.widthP,
8485
8461
  widthP = _node$widthP === undefined ? 'auto' : _node$widthP;
8486
8462
 
@@ -8531,31 +8507,6 @@ var FigureComponent = function FigureComponent(props) {
8531
8507
  margin: figureMargin
8532
8508
  };
8533
8509
 
8534
- if (lightBoxmode) {
8535
- if (link && caption) {
8536
- return React__default.createElement(
8537
- 'a',
8538
- { target: blank ? '_blank' : '_self', href: link },
8539
- React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
8540
- );
8541
- } else if (node && node.asset && node.asset._ref && caption) {
8542
- return React__default.createElement(
8543
- React__default.Fragment,
8544
- null,
8545
- React__default.createElement('div', {
8546
- style: { display: 'inline', cursor: 'pointer', textDecoration: 'underline', paddingLeft: '0.25rem', paddingRight: '0.25rem' },
8547
- className: 'lightbox-caption',
8548
- onClick: function onClick() {
8549
- setOpenImgSrc(urlFor$3(node, client).url());
8550
- setOpenImg(true);
8551
- },
8552
- dangerouslySetInnerHTML: { __html: '<span>' + caption + '</span>' }
8553
- }),
8554
- renderLightbox(openImg, openImgSrc, setOpenImg, setOpenImgSrc)
8555
- );
8556
- }
8557
- }
8558
-
8559
8510
  return React__default.createElement(
8560
8511
  React__default.Fragment,
8561
8512
  null,
@@ -8576,13 +8527,20 @@ var FigureComponent = function FigureComponent(props) {
8576
8527
  src: urlFor$3(node, client).url(),
8577
8528
  alt: alt && alt,
8578
8529
  onClick: function onClick() {
8579
- setOpenImgSrc(urlFor$3(node, client).url());
8580
- setOpenImg(true);
8530
+ setLightboxImgSrc(urlFor$3(node, client).url());
8531
+ setShowLightbox(true);
8581
8532
  }
8582
8533
  }),
8583
8534
  caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
8584
8535
  ),
8585
- renderLightbox(openImg, openImgSrc, setOpenImg, setOpenImgSrc)
8536
+ React__default.createElement(LightBox, {
8537
+ showLightbox: showLightbox,
8538
+ lightboxImgSrc: lightboxImgSrc,
8539
+ closeLightbox: function closeLightbox() {
8540
+ setLightboxImgSrc('');
8541
+ setShowLightbox(false);
8542
+ }
8543
+ })
8586
8544
  ),
8587
8545
  React__default.createElement(
8588
8546
  'style',
@@ -8599,7 +8557,7 @@ var urlFor$4 = function urlFor(source, client) {
8599
8557
  return builder.image(source).auto('format');
8600
8558
  };
8601
8559
 
8602
- function useOutsideAlerter$1(ref, container, setOpenImg, setOpenImgSrc) {
8560
+ function useOutsideAlerter(ref, container, setOpenImg, setOpenImgSrc) {
8603
8561
  useEffect(function () {
8604
8562
  function handleClickOutside(event) {
8605
8563
  if (ref.current && !ref.current.contains(event.target) && container.current && container.current.className.includes('open')) {
@@ -8630,7 +8588,7 @@ var MultiFigure = function MultiFigure(props) {
8630
8588
 
8631
8589
  var lightboxImage = useRef(null);
8632
8590
  var lightboxContainer = useRef(null);
8633
- useOutsideAlerter$1(lightboxImage, lightboxContainer, setOpenImg, setOpenImgSrc);
8591
+ useOutsideAlerter(lightboxImage, lightboxContainer, setOpenImg, setOpenImgSrc);
8634
8592
  if (images && images.length > 0) {
8635
8593
  return React__default.createElement(
8636
8594
  'div',
package/dist/esm/index.js CHANGED
@@ -75,7 +75,7 @@ import 'react-bootstrap/Form';
75
75
  import './index-d2f90501.js';
76
76
  import './js.cookie-6874175c.js';
77
77
  export { default as CMEDeck } from './CMEDeck.js';
78
- export { g as getSerializers } from './index-ed279e5e.js';
78
+ export { g as getSerializers } from './index-e2a6c2d0.js';
79
79
  import './util-7700fc59.js';
80
80
  import './brightcove-react-player-loader.es-83f53e4e.js';
81
81
  import 'react-bootstrap/Pagination';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.659",
3
+ "version": "1.0.661",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",