@mjhls/mjh-framework 1.0.616 → 1.0.618

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.616
2
+ # mjh-framework v. 1.0.618
3
3
 
4
4
  > Foundation Framework
5
5
 
@@ -44,7 +44,7 @@ require('./smoothscroll-95231a70.js');
44
44
  require('./GroupDeck.js');
45
45
  require('react-bootstrap');
46
46
  require('react-bootstrap/Button');
47
- var getSerializers = require('./index-7af3f466.js');
47
+ var getSerializers = require('./index-62d2887b.js');
48
48
  require('./util-f2c1b65b.js');
49
49
  require('./brightcove-react-player-loader.es-156bd4d6.js');
50
50
  require('react-bootstrap/Pagination');
@@ -44,7 +44,7 @@ require('./GroupDeck.js');
44
44
  require('react-bootstrap');
45
45
  var Button = _interopDefault(require('react-bootstrap/Button'));
46
46
  var index$3 = require('./index-5be2866f.js');
47
- var getSerializers = require('./index-7af3f466.js');
47
+ var getSerializers = require('./index-62d2887b.js');
48
48
  require('./util-f2c1b65b.js');
49
49
  require('./brightcove-react-player-loader.es-156bd4d6.js');
50
50
  require('react-bootstrap/Pagination');
@@ -50,7 +50,7 @@ require('./GroupDeck.js');
50
50
  require('react-bootstrap');
51
51
  var QueueDeckExpanded = require('./QueueDeckExpanded.js');
52
52
  require('react-bootstrap/Button');
53
- var getSerializers = require('./index-7af3f466.js');
53
+ var getSerializers = require('./index-62d2887b.js');
54
54
  require('./util-f2c1b65b.js');
55
55
  require('./brightcove-react-player-loader.es-156bd4d6.js');
56
56
  require('react-bootstrap/Pagination');
package/dist/cjs/View.js CHANGED
@@ -44,7 +44,7 @@ require('./smoothscroll-95231a70.js');
44
44
  require('./GroupDeck.js');
45
45
  require('react-bootstrap');
46
46
  var Button = _interopDefault(require('react-bootstrap/Button'));
47
- var getSerializers = require('./index-7af3f466.js');
47
+ var getSerializers = require('./index-62d2887b.js');
48
48
  require('./util-f2c1b65b.js');
49
49
  require('./brightcove-react-player-loader.es-156bd4d6.js');
50
50
  require('react-bootstrap/Pagination');
@@ -39,7 +39,7 @@ require('./smoothscroll-95231a70.js');
39
39
  require('./GroupDeck.js');
40
40
  require('react-bootstrap');
41
41
  require('react-bootstrap/Button');
42
- var getSerializers = require('./index-7af3f466.js');
42
+ var getSerializers = require('./index-62d2887b.js');
43
43
  require('./util-f2c1b65b.js');
44
44
  require('./brightcove-react-player-loader.es-156bd4d6.js');
45
45
  require('react-bootstrap/Pagination');
@@ -8304,7 +8304,20 @@ var compareProps = function compareProps(prevProps, nextProps) {
8304
8304
  return prevProps.node.asset._ref === nextProps.node.asset._ref;
8305
8305
  }
8306
8306
  };
8307
-
8307
+ function useOutsideAlerter(ref, container, setOpenImg, setOpenImgSrc) {
8308
+ React.useEffect(function () {
8309
+ function handleClickOutside(event) {
8310
+ if (ref.current && !ref.current.contains(event.target) && container.current && container.current.className.includes('open')) {
8311
+ setOpenImgSrc('');
8312
+ setOpenImg(false);
8313
+ }
8314
+ }
8315
+ document.addEventListener('mousedown', handleClickOutside);
8316
+ return function () {
8317
+ document.removeEventListener('mousedown', handleClickOutside);
8318
+ };
8319
+ }, [ref]);
8320
+ }
8308
8321
  var FigureComponent = function FigureComponent(props) {
8309
8322
  var _useState = React.useState(false),
8310
8323
  _useState2 = slicedToArray._slicedToArray(_useState, 2),
@@ -8316,6 +8329,9 @@ var FigureComponent = function FigureComponent(props) {
8316
8329
  openImgSrc = _useState4[0],
8317
8330
  setOpenImgSrc = _useState4[1];
8318
8331
 
8332
+ var lightboxImage = React.useRef(null);
8333
+ var lightboxContainer = React.useRef(null);
8334
+ useOutsideAlerter(lightboxImage, lightboxContainer, setOpenImg, setOpenImgSrc);
8319
8335
  if (typeof window === 'undefined') return null;
8320
8336
 
8321
8337
  var node = props.node,
@@ -8421,15 +8437,8 @@ var FigureComponent = function FigureComponent(props) {
8421
8437
  ),
8422
8438
  React__default.createElement(
8423
8439
  'div',
8424
- { className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
8425
- React__default.createElement('img', { src: openImgSrc }),
8426
- React__default.createElement('a', {
8427
- className: 'lightbox-close',
8428
- onClick: function onClick() {
8429
- setOpenImgSrc('');
8430
- setOpenImg(false);
8431
- }
8432
- })
8440
+ { ref: lightboxContainer, className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
8441
+ React__default.createElement('img', { ref: lightboxImage, src: openImgSrc })
8433
8442
  ),
8434
8443
  React__default.createElement(
8435
8444
  'style',
@@ -8486,7 +8495,7 @@ var MultiFigure = function MultiFigure(props) {
8486
8495
  React__default.createElement(
8487
8496
  'style',
8488
8497
  { jsx: 'true' },
8489
- '\n .multi-figure-container {\n margin-bottom: 1rem;\n }\n .multi-figure-image {\n width: 100%;\n height: auto;\n object-fit: cover;\n }\n\n /* Small devices (portrait tablets and phones, 767px and down) */\n @media (max-width: 767px) {\n .multi-figure-image-container {\n margin-bottom: 1rem;\n }\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media (min-width: 768px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 100px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 130px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 200px;\n }\n .multi-figure-container [class*=\'col-\'] + [class*=\'col-\'] {\n padding-left: 0.75rem;\n }\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media (min-width: 992px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 150px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 200px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 300px;\n }\n }\n\n .multi-figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n '
8498
+ '\n .multi-figure-container {\n margin-bottom: 1rem;\n }\n .multi-figure-image {\n width: 100%;\n height: auto;\n object-fit: cover;\n }\n .multi-figure-image-container {\n padding-right: 0.5rem;\n }\n /* Small devices (portrait tablets and phones, 767px and down) */\n @media (max-width: 767px) {\n .multi-figure-image-container {\n margin-bottom: 1rem;\n }\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media (min-width: 768px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 100px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 130px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 200px;\n }\n .multi-figure-container [class*=\'col-\'] + [class*=\'col-\'] {\n padding-left: 0.75rem;\n }\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media (min-width: 992px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 150px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 200px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 300px;\n }\n }\n\n .multi-figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n '
8490
8499
  )
8491
8500
  );
8492
8501
  }
package/dist/cjs/index.js CHANGED
@@ -75,7 +75,7 @@ require('./index-5be2866f.js');
75
75
  require('./js.cookie-a511c430.js');
76
76
  var EventsDeck = require('./EventsDeck.js');
77
77
  var CMEDeck = require('./CMEDeck.js');
78
- var getSerializers = require('./index-7af3f466.js');
78
+ var getSerializers = require('./index-62d2887b.js');
79
79
  require('./util-f2c1b65b.js');
80
80
  require('./brightcove-react-player-loader.es-156bd4d6.js');
81
81
  require('react-bootstrap/Pagination');
@@ -39,7 +39,7 @@ import './smoothscroll-4b699764.js';
39
39
  import './GroupDeck.js';
40
40
  import 'react-bootstrap';
41
41
  import 'react-bootstrap/Button';
42
- import { I as InscreenSensor, g as getSerializers } from './index-49042c81.js';
42
+ import { I as InscreenSensor, g as getSerializers } from './index-5430cb81.js';
43
43
  import './util-7700fc59.js';
44
44
  import './brightcove-react-player-loader.es-83f53e4e.js';
45
45
  import 'react-bootstrap/Pagination';
@@ -38,7 +38,7 @@ import './GroupDeck.js';
38
38
  import 'react-bootstrap';
39
39
  import Button from 'react-bootstrap/Button';
40
40
  import { m as momentTimezone } from './index-d2f90501.js';
41
- import { g as getSerializers } from './index-49042c81.js';
41
+ import { g as getSerializers } from './index-5430cb81.js';
42
42
  import './util-7700fc59.js';
43
43
  import './brightcove-react-player-loader.es-83f53e4e.js';
44
44
  import 'react-bootstrap/Pagination';
@@ -45,7 +45,7 @@ import './GroupDeck.js';
45
45
  import 'react-bootstrap';
46
46
  import QueueDeckExpanded from './QueueDeckExpanded.js';
47
47
  import 'react-bootstrap/Button';
48
- import { g as getSerializers } from './index-49042c81.js';
48
+ import { g as getSerializers } from './index-5430cb81.js';
49
49
  import './util-7700fc59.js';
50
50
  import './brightcove-react-player-loader.es-83f53e4e.js';
51
51
  import 'react-bootstrap/Pagination';
package/dist/esm/View.js CHANGED
@@ -38,7 +38,7 @@ import './smoothscroll-4b699764.js';
38
38
  import './GroupDeck.js';
39
39
  import 'react-bootstrap';
40
40
  import Button from 'react-bootstrap/Button';
41
- import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-49042c81.js';
41
+ import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-5430cb81.js';
42
42
  import './util-7700fc59.js';
43
43
  import './brightcove-react-player-loader.es-83f53e4e.js';
44
44
  import 'react-bootstrap/Pagination';
@@ -37,7 +37,7 @@ import './smoothscroll-4b699764.js';
37
37
  import './GroupDeck.js';
38
38
  import 'react-bootstrap';
39
39
  import 'react-bootstrap/Button';
40
- export { g as default } from './index-49042c81.js';
40
+ export { g as default } from './index-5430cb81.js';
41
41
  import './util-7700fc59.js';
42
42
  import './brightcove-react-player-loader.es-83f53e4e.js';
43
43
  import 'react-bootstrap/Pagination';
@@ -8298,7 +8298,20 @@ var compareProps = function compareProps(prevProps, nextProps) {
8298
8298
  return prevProps.node.asset._ref === nextProps.node.asset._ref;
8299
8299
  }
8300
8300
  };
8301
-
8301
+ function useOutsideAlerter(ref, container, setOpenImg, setOpenImgSrc) {
8302
+ useEffect(function () {
8303
+ function handleClickOutside(event) {
8304
+ if (ref.current && !ref.current.contains(event.target) && container.current && container.current.className.includes('open')) {
8305
+ setOpenImgSrc('');
8306
+ setOpenImg(false);
8307
+ }
8308
+ }
8309
+ document.addEventListener('mousedown', handleClickOutside);
8310
+ return function () {
8311
+ document.removeEventListener('mousedown', handleClickOutside);
8312
+ };
8313
+ }, [ref]);
8314
+ }
8302
8315
  var FigureComponent = function FigureComponent(props) {
8303
8316
  var _useState = useState(false),
8304
8317
  _useState2 = _slicedToArray(_useState, 2),
@@ -8310,6 +8323,9 @@ var FigureComponent = function FigureComponent(props) {
8310
8323
  openImgSrc = _useState4[0],
8311
8324
  setOpenImgSrc = _useState4[1];
8312
8325
 
8326
+ var lightboxImage = useRef(null);
8327
+ var lightboxContainer = useRef(null);
8328
+ useOutsideAlerter(lightboxImage, lightboxContainer, setOpenImg, setOpenImgSrc);
8313
8329
  if (typeof window === 'undefined') return null;
8314
8330
 
8315
8331
  var node = props.node,
@@ -8415,15 +8431,8 @@ var FigureComponent = function FigureComponent(props) {
8415
8431
  ),
8416
8432
  React__default.createElement(
8417
8433
  'div',
8418
- { className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
8419
- React__default.createElement('img', { src: openImgSrc }),
8420
- React__default.createElement('a', {
8421
- className: 'lightbox-close',
8422
- onClick: function onClick() {
8423
- setOpenImgSrc('');
8424
- setOpenImg(false);
8425
- }
8426
- })
8434
+ { ref: lightboxContainer, className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
8435
+ React__default.createElement('img', { ref: lightboxImage, src: openImgSrc })
8427
8436
  ),
8428
8437
  React__default.createElement(
8429
8438
  'style',
@@ -8480,7 +8489,7 @@ var MultiFigure = function MultiFigure(props) {
8480
8489
  React__default.createElement(
8481
8490
  'style',
8482
8491
  { jsx: 'true' },
8483
- '\n .multi-figure-container {\n margin-bottom: 1rem;\n }\n .multi-figure-image {\n width: 100%;\n height: auto;\n object-fit: cover;\n }\n\n /* Small devices (portrait tablets and phones, 767px and down) */\n @media (max-width: 767px) {\n .multi-figure-image-container {\n margin-bottom: 1rem;\n }\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media (min-width: 768px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 100px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 130px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 200px;\n }\n .multi-figure-container [class*=\'col-\'] + [class*=\'col-\'] {\n padding-left: 0.75rem;\n }\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media (min-width: 992px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 150px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 200px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 300px;\n }\n }\n\n .multi-figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n '
8492
+ '\n .multi-figure-container {\n margin-bottom: 1rem;\n }\n .multi-figure-image {\n width: 100%;\n height: auto;\n object-fit: cover;\n }\n .multi-figure-image-container {\n padding-right: 0.5rem;\n }\n /* Small devices (portrait tablets and phones, 767px and down) */\n @media (max-width: 767px) {\n .multi-figure-image-container {\n margin-bottom: 1rem;\n }\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media (min-width: 768px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 100px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 130px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 200px;\n }\n .multi-figure-container [class*=\'col-\'] + [class*=\'col-\'] {\n padding-left: 0.75rem;\n }\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media (min-width: 992px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 150px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 200px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 300px;\n }\n }\n\n .multi-figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n '
8484
8493
  )
8485
8494
  );
8486
8495
  }
package/dist/esm/index.js CHANGED
@@ -71,7 +71,7 @@ import './index-d2f90501.js';
71
71
  import './js.cookie-6874175c.js';
72
72
  export { default as EventsDeck } from './EventsDeck.js';
73
73
  export { default as CMEDeck } from './CMEDeck.js';
74
- export { g as getSerializers } from './index-49042c81.js';
74
+ export { g as getSerializers } from './index-5430cb81.js';
75
75
  import './util-7700fc59.js';
76
76
  import './brightcove-react-player-loader.es-83f53e4e.js';
77
77
  import 'react-bootstrap/Pagination';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.616",
3
+ "version": "1.0.618",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",