@mjhls/mjh-framework 1.0.654-hamresize-v2 → 1.0.655

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.
Files changed (144) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +3 -3
  4. package/dist/cjs/AD300x250x600.js +3 -3
  5. package/dist/cjs/AD728x90.js +4 -4
  6. package/dist/cjs/ADFloatingFooter.js +2 -2
  7. package/dist/cjs/ADGutter.js +2 -2
  8. package/dist/cjs/ADSkyscraper.js +2 -2
  9. package/dist/cjs/ADSponsoredResources.js +2 -2
  10. package/dist/cjs/ADWebcast.js +2 -2
  11. package/dist/cjs/ADWelcome.js +2 -2
  12. package/dist/cjs/AdSlot.js +2 -2
  13. package/dist/cjs/AdSlotsProvider.js +1 -1
  14. package/dist/cjs/ArticleSeriesListing.js +4 -4
  15. package/dist/cjs/Auth.js +506 -255
  16. package/dist/cjs/{BlockContent-80b15fac.js → BlockContent-88f69acd.js} +1 -1
  17. package/dist/cjs/CMEDeck.js +5 -5
  18. package/dist/cjs/Column3.js +4 -4
  19. package/dist/cjs/ConferenceArticleCard.js +2 -2
  20. package/dist/cjs/DeckContent.js +7 -7
  21. package/dist/cjs/DeckQueue.js +6 -6
  22. package/dist/cjs/{Dfp-390337bf.js → Dfp-b2bc3b97.js} +1 -1
  23. package/dist/cjs/EventsDeck.js +5 -5
  24. package/dist/cjs/ExternalResources.js +7 -7
  25. package/dist/cjs/Feature.js +3 -3
  26. package/dist/cjs/ForbesHero.js +2 -2
  27. package/dist/cjs/GridContent.js +11 -11
  28. package/dist/cjs/GridHero.js +2 -2
  29. package/dist/cjs/GroupDeck.js +1 -1
  30. package/dist/cjs/HamMagazine.js +6 -6
  31. package/dist/cjs/Hero.js +1 -1
  32. package/dist/cjs/HorizontalHero.js +2 -2
  33. package/dist/cjs/IssueContentDeck.js +2 -2
  34. package/dist/cjs/IssueDeck.js +2 -2
  35. package/dist/cjs/IssueLanding.js +8 -8
  36. package/dist/cjs/LeftNav.js +2 -2
  37. package/dist/cjs/MasterDeck.js +9 -9
  38. package/dist/cjs/NavMagazine.js +4 -4
  39. package/dist/cjs/NavNative.js +2 -2
  40. package/dist/cjs/OncliveHero.js +2 -2
  41. package/dist/cjs/OncliveLargeHero.js +2 -2
  42. package/dist/cjs/PartnerDetailListing.js +14 -1211
  43. package/dist/cjs/PublicationDeck.js +2 -2
  44. package/dist/cjs/QueueDeckExpanded.js +10 -10
  45. package/dist/cjs/RecentNews.js +2 -2
  46. package/dist/cjs/RelatedContent.js +2 -2
  47. package/dist/cjs/{SocialSearchComponent-81a50f81.js → SocialSearchComponent-962b1344.js} +5 -5
  48. package/dist/cjs/TaxonomyCard.js +2 -2
  49. package/dist/cjs/TemplateNormal.js +3 -3
  50. package/dist/cjs/ThumbnailCard.js +1 -1
  51. package/dist/cjs/Ustream.js +2 -2
  52. package/dist/cjs/VerticalHero.js +2 -2
  53. package/dist/cjs/VideoSeriesCard.js +2 -2
  54. package/dist/cjs/VideoSeriesListing.js +3 -3
  55. package/dist/cjs/View.js +15 -15
  56. package/dist/cjs/YahooHero.js +2 -2
  57. package/dist/cjs/YoutubeGroup.js +1 -1
  58. package/dist/cjs/getRelatedArticle.js +5 -354
  59. package/dist/cjs/getSerializers.js +6 -6
  60. package/dist/cjs/{index-099d45ae.js → index-2d0a4911.js} +4 -6
  61. package/dist/cjs/{index-9176613a.js → index-47e709f6.js} +97 -35
  62. package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
  63. package/dist/cjs/{index-39beccb3.js → index-b5eb3ff8.js} +18 -18
  64. package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
  65. package/dist/cjs/index.js +16 -15
  66. package/dist/cjs/{lodash-7fd85bcf.js → lodash-fc2922d0.js} +22 -71
  67. package/dist/cjs/{main-a4cb15bb.js → main-b6c96c8d.js} +67 -36
  68. package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
  69. package/dist/cjs/urlFor.js +1 -1
  70. package/dist/esm/AD.js +1 -1
  71. package/dist/esm/AD300x250.js +3 -3
  72. package/dist/esm/AD300x250x600.js +3 -3
  73. package/dist/esm/AD728x90.js +4 -4
  74. package/dist/esm/ADFloatingFooter.js +2 -2
  75. package/dist/esm/ADGutter.js +2 -2
  76. package/dist/esm/ADSkyscraper.js +2 -2
  77. package/dist/esm/ADSponsoredResources.js +2 -2
  78. package/dist/esm/ADWebcast.js +2 -2
  79. package/dist/esm/ADWelcome.js +2 -2
  80. package/dist/esm/AdSlot.js +2 -2
  81. package/dist/esm/AdSlotsProvider.js +1 -1
  82. package/dist/esm/ArticleSeriesListing.js +4 -4
  83. package/dist/esm/Auth.js +501 -250
  84. package/dist/esm/{BlockContent-c409aca5.js → BlockContent-a614acdf.js} +1 -1
  85. package/dist/esm/CMEDeck.js +5 -5
  86. package/dist/esm/Column3.js +4 -4
  87. package/dist/esm/ConferenceArticleCard.js +2 -2
  88. package/dist/esm/DeckContent.js +7 -7
  89. package/dist/esm/DeckQueue.js +6 -6
  90. package/dist/esm/{Dfp-741c01be.js → Dfp-8a8fca18.js} +1 -1
  91. package/dist/esm/EventsDeck.js +5 -5
  92. package/dist/esm/ExternalResources.js +7 -7
  93. package/dist/esm/Feature.js +3 -3
  94. package/dist/esm/ForbesHero.js +2 -2
  95. package/dist/esm/GridContent.js +11 -11
  96. package/dist/esm/GridHero.js +2 -2
  97. package/dist/esm/GroupDeck.js +1 -1
  98. package/dist/esm/HamMagazine.js +6 -6
  99. package/dist/esm/Hero.js +1 -1
  100. package/dist/esm/HorizontalHero.js +2 -2
  101. package/dist/esm/IssueContentDeck.js +2 -2
  102. package/dist/esm/IssueDeck.js +2 -2
  103. package/dist/esm/IssueLanding.js +8 -8
  104. package/dist/esm/LeftNav.js +2 -2
  105. package/dist/esm/MasterDeck.js +9 -9
  106. package/dist/esm/NavMagazine.js +4 -4
  107. package/dist/esm/NavNative.js +2 -2
  108. package/dist/esm/OncliveHero.js +2 -2
  109. package/dist/esm/OncliveLargeHero.js +2 -2
  110. package/dist/esm/PartnerDetailListing.js +14 -1210
  111. package/dist/esm/PublicationDeck.js +2 -2
  112. package/dist/esm/QueueDeckExpanded.js +10 -10
  113. package/dist/esm/RecentNews.js +2 -2
  114. package/dist/esm/RelatedContent.js +2 -2
  115. package/dist/esm/{SocialSearchComponent-55960ec4.js → SocialSearchComponent-75527dfe.js} +5 -5
  116. package/dist/esm/TaxonomyCard.js +2 -2
  117. package/dist/esm/TemplateNormal.js +3 -3
  118. package/dist/esm/ThumbnailCard.js +1 -1
  119. package/dist/esm/Ustream.js +2 -2
  120. package/dist/esm/VerticalHero.js +2 -2
  121. package/dist/esm/VideoSeriesCard.js +2 -2
  122. package/dist/esm/VideoSeriesListing.js +3 -3
  123. package/dist/esm/View.js +15 -15
  124. package/dist/esm/YahooHero.js +2 -2
  125. package/dist/esm/YoutubeGroup.js +1 -1
  126. package/dist/esm/getRelatedArticle.js +5 -354
  127. package/dist/esm/getSerializers.js +6 -6
  128. package/dist/esm/{index-3849e3fe.js → index-51a80699.js} +18 -18
  129. package/dist/esm/{index-3f4dd6f2.js → index-93ec3c59.js} +4 -6
  130. package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
  131. package/dist/esm/{index-11dc87c2.js → index-ed279e5e.js} +97 -35
  132. package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
  133. package/dist/esm/index.js +15 -14
  134. package/dist/esm/{lodash-ec8c6b48.js → lodash-17fdfebb.js} +22 -71
  135. package/dist/esm/{main-5d1e4bd3.js → main-0465b2a0.js} +65 -34
  136. package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
  137. package/dist/esm/urlFor.js +1 -1
  138. package/package.json +3 -3
  139. package/dist/cjs/index-bd6c9f56.js +0 -211
  140. package/dist/esm/index-db3bb315.js +0 -207
  141. /package/dist/cjs/{ADInfeed-f886da72.js → ADInfeed-eaa6c661.js} +0 -0
  142. /package/dist/cjs/{ADlgInfeed-7aa459cc.js → ADlgInfeed-f25eb4f7.js} +0 -0
  143. /package/dist/esm/{ADInfeed-67097b02.js → ADInfeed-c27997a3.js} +0 -0
  144. /package/dist/esm/{ADlgInfeed-0bd34fef.js → ADlgInfeed-41c3909c.js} +0 -0
@@ -9,22 +9,22 @@ var inherits = require('./inherits-513d81cd.js');
9
9
  var _typeof$1 = require('./typeof-725500bc.js');
10
10
  var React = require('react');
11
11
  var React__default = _interopDefault(React);
12
- var index = require('./index-099d45ae.js');
12
+ var index = require('./index-2d0a4911.js');
13
13
  var PropTypes = require('prop-types');
14
14
  var PropTypes__default = _interopDefault(PropTypes);
15
15
  var Row = _interopDefault(require('react-bootstrap/Row'));
16
16
  var Col = _interopDefault(require('react-bootstrap/Col'));
17
- var moment = require('./moment-575fe24c.js');
17
+ var moment = require('./moment-66a6a284.js');
18
18
  var Router = require('next/router');
19
19
  var Router__default = _interopDefault(Router);
20
- var index$1 = require('./index-39beccb3.js');
20
+ var index$1 = require('./index-b5eb3ff8.js');
21
21
  var index$2 = require('./index-da796b8c.js');
22
- var main = require('./main-a4cb15bb.js');
22
+ var main = require('./main-b6c96c8d.js');
23
23
  var entities = require('./entities-310b46ee.js');
24
24
  var slicedToArray = require('./slicedToArray-8f385299.js');
25
25
  var Segment = require('./beam-7217b7e7.js');
26
26
  var AdSlot = require('./AdSlot.js');
27
- var BlockContent = require('./BlockContent-80b15fac.js');
27
+ var BlockContent = require('./BlockContent-88f69acd.js');
28
28
  var smoothscroll = require('./smoothscroll-95231a70.js');
29
29
  var GroupDeck = require('./GroupDeck.js');
30
30
  var reactBootstrap = require('react-bootstrap');
@@ -7504,7 +7504,7 @@ var Poll = function Poll(_ref) {
7504
7504
  );
7505
7505
  };
7506
7506
 
7507
- var numberOfPaginations = main.main_35 ? 4 : 10;
7507
+ var numberOfPaginations = main.main_38 ? 4 : 10;
7508
7508
 
7509
7509
  var Quiz = function Quiz(_ref) {
7510
7510
  var quizzes = _ref.quizzes,
@@ -7617,7 +7617,7 @@ var Quiz = function Quiz(_ref) {
7617
7617
  var renderPagination = function renderPagination() {
7618
7618
  return React__default.createElement(
7619
7619
  Pagination,
7620
- { className: 'p-0 m-0', size: main.main_35 && 'sm' },
7620
+ { className: 'p-0 m-0', size: main.main_38 && 'sm' },
7621
7621
  React__default.createElement(Pagination.First, { onClick: function onClick() {
7622
7622
  return changePage('first');
7623
7623
  }, disabled: currentPage === 1 }),
@@ -8037,7 +8037,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8037
8037
  var refArray = React.useRef([]);
8038
8038
  var adRefArray = React.useRef([]);
8039
8039
 
8040
- var _ref2 = main.main_36 ? React.useState(100) : React.useState(-25),
8040
+ var _ref2 = main.main_39 ? React.useState(100) : React.useState(-25),
8041
8041
  _ref3 = slicedToArray._slicedToArray(_ref2, 2),
8042
8042
  NavoffsetTop = _ref3[0],
8043
8043
  setNavoffsetTop = _ref3[1];
@@ -8115,7 +8115,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8115
8115
 
8116
8116
  React.useEffect(function () {
8117
8117
  try {
8118
- if (main.main_36) {
8118
+ if (main.main_39) {
8119
8119
  setNavoffsetTop(document.getElementById('navbar-ham').offsetHeight - 15);
8120
8120
  }
8121
8121
  } catch (e) {}
@@ -8195,7 +8195,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8195
8195
 
8196
8196
  React.useEffect(function () {
8197
8197
  if (!firstLoad) {
8198
- if (main.main_36) {
8198
+ if (main.main_39) {
8199
8199
  grabLoadedAds();
8200
8200
  } else {
8201
8201
  scrollToArticle();
@@ -8219,7 +8219,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8219
8219
  //const activeArticle = path
8220
8220
  //let targeting = getTargeting({ article: activeArticle, cpModificationRequired, position: props.position, prevUrl })
8221
8221
 
8222
- if (!main.main_36) {
8222
+ if (!main.main_39) {
8223
8223
  index.lib_3.getGoogletag().then(function (googletag) {
8224
8224
  if (window.googletag && googletag.pubadsReady) {
8225
8225
  index.lib_3.refresh();
@@ -8227,7 +8227,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8227
8227
  });
8228
8228
  }
8229
8229
  //Refresh leaderboard ad on mobile
8230
- if (main.main_36) {
8230
+ if (main.main_39) {
8231
8231
  var leaderboardSlotId = '';
8232
8232
  index.lib_3.getGoogletag().then(function (googletag) {
8233
8233
  if (window.googletag && googletag.pubadsReady) {
@@ -8259,7 +8259,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8259
8259
  React__default.createElement(
8260
8260
  'div',
8261
8261
  { className: 'ad-box', style: { textAlign: 'center' } },
8262
- main.main_36 && Ads.map(function (ad, index) {
8262
+ main.main_39 && Ads.map(function (ad, index) {
8263
8263
  if (index === 0) {
8264
8264
  return React__default.createElement(
8265
8265
  'div',
@@ -8357,7 +8357,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8357
8357
  React__default.createElement(
8358
8358
  'div',
8359
8359
  { className: 'ad-box', style: { textAlign: 'center' } },
8360
- main.main_36 && nodes.articles.length - 1 !== index && Ads.map(function (ad, innerIndex) {
8360
+ main.main_39 && nodes.articles.length - 1 !== index && Ads.map(function (ad, innerIndex) {
8361
8361
  if (innerIndex === 0) {
8362
8362
  return React__default.createElement(
8363
8363
  'div',
@@ -8391,16 +8391,6 @@ var ArticleSeries = function ArticleSeries(_ref) {
8391
8391
  );
8392
8392
  };
8393
8393
 
8394
- var urlFor$3 = function urlFor(source, client) {
8395
- var builder = index$1.imageUrlBuilder(client);
8396
- return builder.image(source).auto('format');
8397
- };
8398
-
8399
- var compareProps = function compareProps(prevProps, nextProps) {
8400
- if (nextProps.node.asset && nextProps.node.asset._ref) {
8401
- return prevProps.node.asset._ref === nextProps.node.asset._ref;
8402
- }
8403
- };
8404
8394
  function useOutsideAlerter(ref, container, setOpenImg, setOpenImgSrc) {
8405
8395
  React.useEffect(function () {
8406
8396
  function handleClickOutside(event) {
@@ -8415,6 +8405,34 @@ function useOutsideAlerter(ref, container, setOpenImg, setOpenImgSrc) {
8415
8405
  };
8416
8406
  }, [ref]);
8417
8407
  }
8408
+
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
+ return React__default.createElement(
8414
+ 'div',
8415
+ { ref: lightboxContainer, className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
8416
+ React__default.createElement('img', { ref: lightboxImage, src: openImgSrc }),
8417
+ React__default.createElement(
8418
+ 'style',
8419
+ { jsx: 'true' },
8420
+ '\n /*Eliminates padding, centers the thumbnail */\n\n /* Styles the lightbox, removes it from sight and adds the fade-in transition */\n\n .lightbox-target {\n position: fixed;\n top: -100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.7);\n width: 100%;\n opacity: 0;\n -webkit-transition: opacity 0.5s ease-in-out;\n -moz-transition: opacity 0.5s ease-in-out;\n -o-transition: opacity 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n overflow: hidden;\n }\n\n .lightbox-target.close {\n opacity: 0;\n }\n\n /* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */\n\n .lightbox-target img {\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 0%;\n max-width: 0%;\n border: 3px solid white;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Styles the close link, adds the slide down transition */\n\n a.lightbox-close {\n display: block;\n width: 50px;\n height: 50px;\n box-sizing: border-box;\n background: white;\n color: black;\n text-decoration: none;\n position: absolute;\n top: -80px;\n right: 0;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:before {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:after {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(-45deg);\n -moz-transform: rotate(-45deg);\n -o-transform: rotate(-45deg);\n transform: rotate(-45deg);\n }\n\n /* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */\n\n .lightbox-target.open {\n opacity: 1;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 3000000;\n }\n\n .lightbox-target.open img {\n max-height: 100%;\n max-width: 100%;\n }\n\n .lightbox-target.open a.lightbox-close {\n top: 0px;\n }\n '
8421
+ )
8422
+ );
8423
+ };
8424
+
8425
+ var urlFor$3 = function urlFor(source, client) {
8426
+ var builder = index$1.imageUrlBuilder(client);
8427
+ return builder.image(source).auto('format');
8428
+ };
8429
+
8430
+ var compareProps = function compareProps(prevProps, nextProps) {
8431
+ if (nextProps.node.asset && nextProps.node.asset._ref) {
8432
+ return prevProps.node.asset._ref === nextProps.node.asset._ref;
8433
+ }
8434
+ };
8435
+
8418
8436
  var FigureComponent = function FigureComponent(props) {
8419
8437
  var _useState = React.useState(false),
8420
8438
  _useState2 = slicedToArray._slicedToArray(_useState, 2),
@@ -8426,11 +8444,32 @@ var FigureComponent = function FigureComponent(props) {
8426
8444
  openImgSrc = _useState4[0],
8427
8445
  setOpenImgSrc = _useState4[1];
8428
8446
 
8429
- var lightboxImage = React.useRef(null);
8430
- var lightboxContainer = React.useRef(null);
8431
- useOutsideAlerter(lightboxImage, lightboxContainer, setOpenImg, setOpenImgSrc);
8432
8447
  if (typeof window === 'undefined') return null;
8433
8448
 
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
+
8434
8473
  var node = props.node,
8435
8474
  client = props.client;
8436
8475
 
@@ -8446,7 +8485,9 @@ var FigureComponent = function FigureComponent(props) {
8446
8485
  _node$class_name = node.class_name,
8447
8486
  class_name = _node$class_name === undefined ? 'd-block' : _node$class_name,
8448
8487
  _node$disableTextWrap = node.disableTextWrap,
8449
- disableTextWrap = _node$disableTextWrap === undefined ? false : _node$disableTextWrap;
8488
+ disableTextWrap = _node$disableTextWrap === undefined ? false : _node$disableTextWrap,
8489
+ _node$lightBoxmode = node.lightBoxmode,
8490
+ lightBoxmode = _node$lightBoxmode === undefined ? false : _node$lightBoxmode;
8450
8491
  var _node$widthP = node.widthP,
8451
8492
  widthP = _node$widthP === undefined ? 'auto' : _node$widthP;
8452
8493
 
@@ -8497,6 +8538,31 @@ var FigureComponent = function FigureComponent(props) {
8497
8538
  margin: figureMargin
8498
8539
  };
8499
8540
 
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
+
8500
8566
  return React__default.createElement(
8501
8567
  React__default.Fragment,
8502
8568
  null,
@@ -8522,17 +8588,13 @@ var FigureComponent = function FigureComponent(props) {
8522
8588
  }
8523
8589
  }),
8524
8590
  caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
8525
- )
8526
- ),
8527
- React__default.createElement(
8528
- 'div',
8529
- { ref: lightboxContainer, className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
8530
- React__default.createElement('img', { ref: lightboxImage, src: openImgSrc })
8591
+ ),
8592
+ renderLightbox(openImg, openImgSrc, setOpenImg, setOpenImgSrc)
8531
8593
  ),
8532
8594
  React__default.createElement(
8533
8595
  'style',
8534
8596
  { jsx: 'true' },
8535
- '\n figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n /*Eliminates padding, centers the thumbnail */\n\n /* Styles the lightbox, removes it from sight and adds the fade-in transition */\n\n .lightbox-target {\n position: fixed;\n top: -100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.7);\n width: 100%;\n opacity: 0;\n -webkit-transition: opacity 0.5s ease-in-out;\n -moz-transition: opacity 0.5s ease-in-out;\n -o-transition: opacity 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n overflow: hidden;\n }\n\n .lightbox-target.close {\n opacity: 0;\n }\n\n /* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */\n\n .lightbox-target img {\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 0%;\n max-width: 0%;\n border: 3px solid white;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Styles the close link, adds the slide down transition */\n\n a.lightbox-close {\n display: block;\n width: 50px;\n height: 50px;\n box-sizing: border-box;\n background: white;\n color: black;\n text-decoration: none;\n position: absolute;\n top: -80px;\n right: 0;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:before {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:after {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(-45deg);\n -moz-transform: rotate(-45deg);\n -o-transform: rotate(-45deg);\n transform: rotate(-45deg);\n }\n\n /* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */\n\n .lightbox-target.open {\n opacity: 1;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 3000000;\n }\n\n .lightbox-target.open img {\n max-height: 100%;\n max-width: 100%;\n }\n\n .lightbox-target.open a.lightbox-close {\n top: 0px;\n }\n '
8597
+ '\n .figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n '
8536
8598
  )
8537
8599
  );
8538
8600
  };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
4
- var moment = require('./moment-575fe24c.js');
4
+ var moment = require('./moment-66a6a284.js');
5
5
 
6
6
  var momentTimezone = _commonjsHelpers.createCommonjsModule(function (module) {
7
7
  //! moment-timezone.js
@@ -60,35 +60,35 @@ function parseSource(source) {
60
60
  if (typeof source === 'string' && isUrl(source)) {
61
61
  // Someone passed an existing image url?
62
62
  image = {
63
- asset: { _ref: urlToId(source) }
63
+ asset: { _ref: urlToId(source) },
64
64
  };
65
65
  }
66
66
  else if (typeof source === 'string') {
67
67
  // Just an asset id
68
68
  image = {
69
- asset: { _ref: source }
69
+ asset: { _ref: source },
70
70
  };
71
71
  }
72
72
  else if (isRef(source)) {
73
73
  // We just got passed an asset directly
74
74
  image = {
75
- asset: source
75
+ asset: source,
76
76
  };
77
77
  }
78
78
  else if (isAsset(source)) {
79
79
  // If we were passed an image asset document
80
80
  image = {
81
81
  asset: {
82
- _ref: source._id || ''
83
- }
82
+ _ref: source._id || '',
83
+ },
84
84
  };
85
85
  }
86
86
  else if (isAssetStub(source)) {
87
87
  // If we were passed a partial asset (`url`, but no `_id`)
88
88
  image = {
89
89
  asset: {
90
- _ref: urlToId(source.asset.url)
91
- }
90
+ _ref: urlToId(source.asset.url),
91
+ },
92
92
  };
93
93
  }
94
94
  else if (typeof source.asset === 'object') {
@@ -129,7 +129,7 @@ function applyDefaults(image) {
129
129
  left: 0,
130
130
  top: 0,
131
131
  bottom: 0,
132
- right: 0
132
+ right: 0,
133
133
  };
134
134
  }
135
135
  if (!result.hotspot) {
@@ -137,7 +137,7 @@ function applyDefaults(image) {
137
137
  x: 0.5,
138
138
  y: 0.5,
139
139
  height: 1.0,
140
- width: 1.0
140
+ width: 1.0,
141
141
  };
142
142
  }
143
143
  return result;
@@ -184,7 +184,7 @@ exports.SPEC_NAME_TO_URL_NAME_MAPPINGS = [
184
184
  ['crop', 'crop'],
185
185
  ['saturation', 'sat'],
186
186
  ['auto', 'auto'],
187
- ['dpr', 'dpr']
187
+ ['dpr', 'dpr'],
188
188
  ];
189
189
  function urlForImage(options) {
190
190
  var spec = __assign({}, (options || {}));
@@ -203,7 +203,7 @@ function urlForImage(options) {
203
203
  left: cropLeft,
204
204
  top: cropTop,
205
205
  width: Math.round(asset.width - image.crop.right * asset.width - cropLeft),
206
- height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop)
206
+ height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop),
207
207
  };
208
208
  // Compute hot spot rect in terms of pixel coordinates
209
209
  var hotSpotVerticalRadius = (image.hotspot.height * asset.height) / 2;
@@ -214,7 +214,7 @@ function urlForImage(options) {
214
214
  left: hotSpotCenterX - hotSpotHorizontalRadius,
215
215
  top: hotSpotCenterY - hotSpotVerticalRadius,
216
216
  right: hotSpotCenterX + hotSpotHorizontalRadius,
217
- bottom: hotSpotCenterY + hotSpotVerticalRadius
217
+ bottom: hotSpotCenterY + hotSpotVerticalRadius,
218
218
  };
219
219
  // If irrelevant, or if we are requested to: don't perform crop/fit based on
220
220
  // the crop/hotspot.
@@ -296,7 +296,7 @@ function fit(source, spec) {
296
296
  left: Math.round(left),
297
297
  top: Math.round(top_2),
298
298
  width: Math.round(width),
299
- height: Math.round(height)
299
+ height: Math.round(height),
300
300
  };
301
301
  }
302
302
  else {
@@ -318,13 +318,13 @@ function fit(source, spec) {
318
318
  left: Math.max(0, Math.floor(left)),
319
319
  top: Math.max(0, Math.floor(top_3)),
320
320
  width: Math.round(width),
321
- height: Math.round(height)
321
+ height: Math.round(height),
322
322
  };
323
323
  }
324
324
  return {
325
325
  width: imgWidth,
326
326
  height: imgHeight,
327
- rect: cropRect
327
+ rect: cropRect,
328
328
  };
329
329
  }
330
330
 
@@ -382,7 +382,7 @@ function urlBuilder(options) {
382
382
  return new ImageUrlBuilder(null, {
383
383
  baseUrl: apiHost.replace(/^https:\/\/api\./, 'https://cdn.'),
384
384
  projectId: projectId,
385
- dataset: dataset
385
+ dataset: dataset,
386
386
  });
387
387
  }
388
388
  // Or just accept the options as given
@@ -395,7 +395,7 @@ var ImageUrlBuilder = /** @class */ (function () {
395
395
  ? __assign(__assign({}, (parent.options || {})), (options || {})) : __assign({}, (options || {})); // Copy options
396
396
  }
397
397
  ImageUrlBuilder.prototype.withOptions = function (options) {
398
- var baseUrl = options.baseUrl || '';
398
+ var baseUrl = options.baseUrl || this.options.baseUrl;
399
399
  var newOptions = { baseUrl: baseUrl };
400
400
  for (var key in options) {
401
401
  if (options.hasOwnProperty(key)) {
@@ -523,7 +523,7 @@ var ImageUrlBuilder = /** @class */ (function () {
523
523
  ImageUrlBuilder.prototype.url = function () {
524
524
  return urlForImage_1$1.default(this.options);
525
525
  };
526
- // Synonym for url()
526
+ // Alias for url()
527
527
  ImageUrlBuilder.prototype.toString = function () {
528
528
  return this.url();
529
529
  };
@@ -268,6 +268,9 @@ var InfiniteScroll = /** @class */ (function (_super) {
268
268
  _this.dragging = false;
269
269
  if (_this.state.pullToRefreshThresholdBreached) {
270
270
  _this.props.refreshFunction && _this.props.refreshFunction();
271
+ _this.setState({
272
+ pullToRefreshThresholdBreached: false,
273
+ });
271
274
  }
272
275
  requestAnimationFrame(function () {
273
276
  // this._infScroll
@@ -374,7 +377,6 @@ var InfiniteScroll = /** @class */ (function (_super) {
374
377
  // update state when new data was sent in
375
378
  this.setState({
376
379
  showLoader: false,
377
- pullToRefreshThresholdBreached: false,
378
380
  });
379
381
  };
380
382
  InfiniteScroll.prototype.isElementAtBottom = function (target, scrollThreshold) {
package/dist/cjs/index.js CHANGED
@@ -18,22 +18,22 @@ require('./web.dom.iterable-a0e279c1.js');
18
18
  require('./typeof-725500bc.js');
19
19
  require('./_is-array-754e012d.js');
20
20
  require('react');
21
- require('./index-099d45ae.js');
21
+ require('./index-2d0a4911.js');
22
22
  require('prop-types');
23
23
  require('react-bootstrap/Container');
24
24
  require('react-bootstrap/Row');
25
25
  require('react-bootstrap/Col');
26
26
  require('react-bootstrap/Card');
27
- require('./moment-575fe24c.js');
27
+ require('./moment-66a6a284.js');
28
28
  require('next/router');
29
29
  require('./isSymbol-04666465.js');
30
30
  require('./debounce-eb287781.js');
31
- require('./index.es-9110add6.js');
31
+ require('./index.es-ab3f2690.js');
32
32
  require('react-dom');
33
33
  require('./visibility-sensor-0c45a583.js');
34
- require('./index-39beccb3.js');
34
+ require('./index-b5eb3ff8.js');
35
35
  require('./index-da796b8c.js');
36
- require('./main-a4cb15bb.js');
36
+ require('./main-b6c96c8d.js');
37
37
  require('./entities-310b46ee.js');
38
38
  require('./stringify-7c5aff47.js');
39
39
  require('./slicedToArray-8f385299.js');
@@ -41,10 +41,10 @@ require('./asyncToGenerator-533d476a.js');
41
41
  require('./_set-species-f92c67c5.js');
42
42
  var Segment = require('./beam-7217b7e7.js');
43
43
  var AdSlot = require('./AdSlot.js');
44
- require('./ADInfeed-f886da72.js');
44
+ require('./ADInfeed-eaa6c661.js');
45
45
  var DeckContent = require('./DeckContent.js');
46
- require('./lodash-7fd85bcf.js');
47
- require('./ADlgInfeed-7aa459cc.js');
46
+ require('./lodash-fc2922d0.js');
47
+ require('./ADlgInfeed-f25eb4f7.js');
48
48
  require('./getContentCategory-f38a4c00.js');
49
49
  require('./get-68c52cb1.js');
50
50
  var AD = require('./AD.js');
@@ -53,7 +53,7 @@ var GridContent = require('./GridContent.js');
53
53
  var DeckQueue = require('./DeckQueue.js');
54
54
  require('react-bootstrap/Media');
55
55
  var ThumbnailCard = require('./ThumbnailCard.js');
56
- require('./BlockContent-80b15fac.js');
56
+ require('./BlockContent-88f69acd.js');
57
57
  require('./react-social-icons-f7f48f71.js');
58
58
  var TaxonomyCard = require('./TaxonomyCard.js');
59
59
  var RolesDeck = require('./RolesDeck.js');
@@ -76,10 +76,10 @@ require('./defineProperty-55548b25.js');
76
76
  var EventsDeck = require('./EventsDeck.js');
77
77
  require('react-bootstrap/Spinner');
78
78
  require('react-bootstrap/Form');
79
- require('./index-3294d3bc.js');
79
+ require('./index-5be2866f.js');
80
80
  require('./js.cookie-a511c430.js');
81
81
  var CMEDeck = require('./CMEDeck.js');
82
- var getSerializers = require('./index-9176613a.js');
82
+ var getSerializers = require('./index-47e709f6.js');
83
83
  require('./util-f2c1b65b.js');
84
84
  require('./brightcove-react-player-loader.es-156bd4d6.js');
85
85
  require('react-bootstrap/Pagination');
@@ -110,7 +110,7 @@ require('./NavFooter-76c913e3.js');
110
110
  require('./index.esm-fe549f9c.js');
111
111
  var SocialIcons = require('./SocialIcons.js');
112
112
  require('react-bootstrap/FormControl');
113
- require('./SocialSearchComponent-81a50f81.js');
113
+ require('./SocialSearchComponent-962b1344.js');
114
114
  var NavMagazine = require('./NavMagazine.js');
115
115
  var NavNative = require('./NavNative.js');
116
116
  var Search = require('./Search.js');
@@ -157,9 +157,9 @@ var ConferenceArticleCard = require('./ConferenceArticleCard.js');
157
157
  var KMTracker = require('./KMTracker.js');
158
158
  var getSeriesDetail = require('./getSeriesDetail.js');
159
159
  var SetCookie = require('./SetCookie.js');
160
- require('./index-bd6c9f56.js');
161
- var getRelatedArticle = require('./getRelatedArticle.js');
160
+ require('nookies');
162
161
  var getQuery = require('./getQuery.js');
162
+ var getRelatedArticle = require('./getRelatedArticle.js');
163
163
  var Auth = require('./Auth.js');
164
164
  require('swr');
165
165
  require('passport-local');
@@ -169,6 +169,7 @@ var View = require('./View.js');
169
169
  var getKeywords = require('./getKeywords.js');
170
170
  var urlFor = require('./urlFor.js');
171
171
  require('./style-inject.es-dcee06b6.js');
172
+ require('react-twitter-embed');
172
173
  var PartnerDetailListing = require('./PartnerDetailListing.js');
173
174
 
174
175
 
@@ -248,8 +249,8 @@ exports.ConferenceArticleCard = ConferenceArticleCard;
248
249
  exports.KMTracker = KMTracker;
249
250
  exports.getSeriesDetail = getSeriesDetail;
250
251
  exports.SetCookie = SetCookie;
251
- exports.getRelatedArticle = getRelatedArticle;
252
252
  exports.getQuery = getQuery;
253
+ exports.getRelatedArticle = getRelatedArticle;
253
254
  exports.Auth = Auth.default;
254
255
  exports.getTargeting = getTargeting.getTargeting;
255
256
  exports.View = View;