@mjhls/mjh-framework 1.0.660 → 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 +1 -1
- package/dist/cjs/ExternalResources.js +1 -1
- package/dist/cjs/PartnerDetailListing.js +1 -1
- package/dist/cjs/View.js +1 -1
- package/dist/cjs/getSerializers.js +1 -1
- package/dist/cjs/{index-47e709f6.js → index-2831c002.js} +34 -76
- package/dist/cjs/index.js +1 -1
- package/dist/esm/ExternalResources.js +1 -1
- package/dist/esm/PartnerDetailListing.js +1 -1
- package/dist/esm/View.js +1 -1
- package/dist/esm/getSerializers.js +1 -1
- package/dist/esm/{index-ed279e5e.js → index-e2a6c2d0.js} +35 -77
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
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
|
-
}, [
|
|
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 ' + (
|
|
8416
|
-
React__default.createElement('img', { ref: lightboxImage, src:
|
|
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
|
-
|
|
8440
|
-
|
|
8441
|
+
showLightbox = _useState2[0],
|
|
8442
|
+
setShowLightbox = _useState2[1];
|
|
8441
8443
|
|
|
8442
8444
|
var _useState3 = React.useState(''),
|
|
8443
8445
|
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
8444
|
-
|
|
8445
|
-
|
|
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
|
-
|
|
8587
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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-
|
|
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');
|
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
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
|
-
}, [
|
|
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 ' + (
|
|
8409
|
-
React__default.createElement('img', { ref: lightboxImage, src:
|
|
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
|
-
|
|
8433
|
-
|
|
8434
|
+
showLightbox = _useState2[0],
|
|
8435
|
+
setShowLightbox = _useState2[1];
|
|
8434
8436
|
|
|
8435
8437
|
var _useState3 = useState(''),
|
|
8436
8438
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
8437
|
-
|
|
8438
|
-
|
|
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
|
-
|
|
8580
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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-
|
|
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';
|