@mjhls/mjh-framework 1.0.939-nojs-pagination-v5 → 1.0.939-segment-test

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 (82) hide show
  1. package/README.md +168 -168
  2. package/dist/cjs/AlgoliaSearch.js +15 -131
  3. package/dist/cjs/ArticleProgramLandingPage.js +1 -2
  4. package/dist/cjs/ArticleSeriesLandingPage.js +1 -2
  5. package/dist/cjs/AuthWrapper.js +1 -1
  6. package/dist/cjs/ConferenceArticleCard.js +15 -15
  7. package/dist/cjs/ContentCardPaginated.js +2 -1
  8. package/dist/cjs/DeckContent.js +17 -30
  9. package/dist/cjs/DeckQueuePaginated.js +2 -1
  10. package/dist/cjs/EventsDeck.js +17 -17
  11. package/dist/cjs/GridContent.js +11 -26
  12. package/dist/cjs/GridContentPaginated.js +2 -1
  13. package/dist/cjs/HamMagazine.js +9 -9
  14. package/dist/cjs/IssueLanding.js +29 -29
  15. package/dist/cjs/KMTracker.js +15 -15
  16. package/dist/cjs/MasterDeck.js +18 -17
  17. package/dist/cjs/MasterDeckPaginated.js +10 -9
  18. package/dist/cjs/{MediaSeriesCard-cc5aa886.js → MediaSeriesCard-659279e0.js} +1 -1
  19. package/dist/cjs/MediaSeriesLanding.js +7 -8
  20. package/dist/cjs/MediaSeriesLandingPaginated.js +9 -9
  21. package/dist/cjs/NavMagazine.js +10 -10
  22. package/dist/cjs/NavNative.js +9 -9
  23. package/dist/cjs/Pagination-885dcfbd.js +90 -0
  24. package/dist/cjs/PartnerDetailListingPaginated.js +2 -1
  25. package/dist/cjs/PublicationLanding.js +26 -26
  26. package/dist/cjs/QueueDeckExpanded.js +5 -3
  27. package/dist/cjs/QueueDeckExpandedPaginated.js +2 -1
  28. package/dist/cjs/RelatedContent.js +28 -28
  29. package/dist/cjs/RelatedTopicsDropdown.js +10 -10
  30. package/dist/cjs/SeriesListingDeck.js +1 -1
  31. package/dist/cjs/{SeriesSlider-de93a303.js → SeriesSlider-ba0c5d1a.js} +4 -4
  32. package/dist/cjs/SideFooter.js +2 -2
  33. package/dist/cjs/VideoProgramLandingPage.js +1 -2
  34. package/dist/cjs/VideoSeriesCard.js +1 -1
  35. package/dist/cjs/VideoSeriesListing.js +9 -17
  36. package/dist/cjs/View.js +63 -37
  37. package/dist/cjs/YoutubeGroup.js +4 -4
  38. package/dist/cjs/{getTargeting-dab97fe1.js → getTargeting-3c5754ac.js} +9 -9
  39. package/dist/cjs/getTargeting.js +1 -1
  40. package/dist/cjs/index.js +3 -2
  41. package/dist/esm/AlgoliaSearch.js +16 -132
  42. package/dist/esm/ArticleProgramLandingPage.js +1 -2
  43. package/dist/esm/ArticleSeriesLandingPage.js +1 -2
  44. package/dist/esm/AuthWrapper.js +1 -1
  45. package/dist/esm/ConferenceArticleCard.js +15 -15
  46. package/dist/esm/ContentCardPaginated.js +2 -1
  47. package/dist/esm/DeckContent.js +17 -30
  48. package/dist/esm/DeckQueuePaginated.js +2 -1
  49. package/dist/esm/EventsDeck.js +17 -17
  50. package/dist/esm/GridContent.js +11 -26
  51. package/dist/esm/GridContentPaginated.js +2 -1
  52. package/dist/esm/HamMagazine.js +9 -9
  53. package/dist/esm/IssueLanding.js +29 -29
  54. package/dist/esm/KMTracker.js +15 -15
  55. package/dist/esm/MasterDeck.js +18 -17
  56. package/dist/esm/MasterDeckPaginated.js +10 -9
  57. package/dist/esm/{MediaSeriesCard-2dc3c439.js → MediaSeriesCard-06c6251a.js} +1 -1
  58. package/dist/esm/MediaSeriesLanding.js +7 -8
  59. package/dist/esm/MediaSeriesLandingPaginated.js +9 -9
  60. package/dist/esm/NavMagazine.js +10 -10
  61. package/dist/esm/NavNative.js +9 -9
  62. package/dist/esm/Pagination-59436882.js +82 -0
  63. package/dist/esm/PartnerDetailListingPaginated.js +2 -1
  64. package/dist/esm/PublicationLanding.js +26 -26
  65. package/dist/esm/QueueDeckExpanded.js +5 -3
  66. package/dist/esm/QueueDeckExpandedPaginated.js +2 -1
  67. package/dist/esm/RelatedContent.js +28 -28
  68. package/dist/esm/RelatedTopicsDropdown.js +10 -10
  69. package/dist/esm/SeriesListingDeck.js +1 -1
  70. package/dist/esm/{SeriesSlider-98ad6d97.js → SeriesSlider-45adb8dc.js} +4 -4
  71. package/dist/esm/SideFooter.js +2 -2
  72. package/dist/esm/VideoProgramLandingPage.js +1 -2
  73. package/dist/esm/VideoSeriesCard.js +1 -1
  74. package/dist/esm/VideoSeriesListing.js +9 -17
  75. package/dist/esm/View.js +62 -37
  76. package/dist/esm/YoutubeGroup.js +4 -4
  77. package/dist/esm/{getTargeting-04d979c9.js → getTargeting-42f9b439.js} +9 -9
  78. package/dist/esm/getTargeting.js +1 -1
  79. package/dist/esm/index.js +3 -2
  80. package/package.json +115 -115
  81. package/dist/cjs/Pagination-42f92f7c.js +0 -97
  82. package/dist/esm/Pagination-484b86c5.js +0 -90
package/dist/cjs/View.js CHANGED
@@ -19,8 +19,8 @@ var visibilitySensor = require('./visibility-sensor-eb2c5b69.js');
19
19
  var SocialShare = require('./SocialShare.js');
20
20
  var getSerializers = require('./index-c991e29a.js');
21
21
  var AdSlot = require('./AdSlot.js');
22
- var SeriesSlider = require('./SeriesSlider-de93a303.js');
23
- var getTargeting = require('./getTargeting-dab97fe1.js');
22
+ var SeriesSlider = require('./SeriesSlider-ba0c5d1a.js');
23
+ var getTargeting = require('./getTargeting-3c5754ac.js');
24
24
  var getKeywords = require('./getKeywords.js');
25
25
  var urlFor = require('./urlFor.js');
26
26
  var urlForFile = require('./urlForFile-29d3815a.js');
@@ -30,13 +30,14 @@ var styleInject_es = require('./style-inject.es-dcee06b6.js');
30
30
  require('./index-eadd5035.js');
31
31
  var disqusReact = require('disqus-react');
32
32
  var Schema = require('./Schema.js');
33
- var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
33
+ var FileSaver = require('file-saver');
34
34
  var keys = require('./keys-e982b3fa.js');
35
35
  var index_es = require('./index.es-f3e47207.js');
36
36
  var index = require('./index-fc2f1ca2.js');
37
37
  var getRelatedArticle = require('./getRelatedArticle.js');
38
38
  var getQuery = require('./getQuery.js');
39
39
  var getSeriesDetail = require('./getSeriesDetail.js');
40
+ require('./_commonjsHelpers-06173234.js');
40
41
  require('./core.get-iterator-method-5643aa10.js');
41
42
  require('./web.dom.iterable-d98303e0.js');
42
43
  require('./_library-dd23b178.js');
@@ -83,6 +84,7 @@ var Head__default = /*#__PURE__*/_interopDefaultLegacy(Head);
83
84
  var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form);
84
85
  var FormControl__default = /*#__PURE__*/_interopDefaultLegacy(FormControl);
85
86
  var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
87
+ var FileSaver__default = /*#__PURE__*/_interopDefaultLegacy(FileSaver);
86
88
 
87
89
  var getArticleSummary = function getArticleSummary(article) {
88
90
  if (article.summary && article.summary.length > 0) {
@@ -349,7 +351,7 @@ var ISI = function ISI(props) {
349
351
  );
350
352
  };
351
353
 
352
- var css$1 = ".RelatedArticles-module_mediaContainer__10h9k {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: nowrap;\r\n margin: 0 -1rem;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn {\r\n margin: 0 1rem 1rem;\r\n width: calc(33% - 1rem);\r\n display: column;\r\n flex-direction: row;\r\n margin-bottom: 0.75rem;\r\n padding-bottom: 0.75rem;\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn:last-child {\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_cardTitle__3P-Ib {\r\n font-weight: bold;\r\n color: #252525;\r\n margin-bottom: 0.25rem;\r\n font-size: 15px;\r\n}\r\n.RelatedArticles-module_authorListing__1EFg4 span.RelatedArticles-module_text-muted__3b0zX {\r\n color: #000;\r\n font-weight: bold;\r\n}\r\n.RelatedArticles-module_cardDate__1wOR5 {\r\n color: var(--dark);\r\n display: block;\r\n background: #fff !important;\r\n margin-bottom: 0;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: block;\r\n text-align: center;\r\n margin-bottom: 0.5rem;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 img {\r\n height: 135px;\r\n width: 100%;\r\n object-fit: cover;\r\n object-position: center;\r\n}\r\n@media screen and (max-width: 1064px) {\r\n}\r\n@media screen and (max-width: 968px) {\r\n .RelatedArticles-module_mediaContainer__10h9k {\r\n flex-wrap: wrap;\r\n }\r\n .RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: none;\r\n }\r\n .RelatedArticles-module_mediaCard__3wQbn {\r\n width: 100%;\r\n margin-bottom: 0.5rem;\r\n padding: 0;\r\n }\r\n .RelatedArticles-module_cardTitle__3P-Ib {\r\n font-size: 0.75rem;\r\n margin-bottom: 0;\r\n }\r\n}\r\n";
354
+ var css$1 = ".RelatedArticles-module_mediaContainer__10h9k {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n margin: 0 -1rem;\n}\n.RelatedArticles-module_mediaCard__3wQbn {\n margin: 0 1rem 1rem;\n width: calc(33% - 1rem);\n display: column;\n flex-direction: row;\n margin-bottom: 0.75rem;\n padding-bottom: 0.75rem;\n border-bottom: none;\n}\n.RelatedArticles-module_mediaCard__3wQbn:last-child {\n border-bottom: none;\n}\n.RelatedArticles-module_cardTitle__3P-Ib {\n font-weight: bold;\n color: #252525;\n margin-bottom: 0.25rem;\n font-size: 15px;\n}\n.RelatedArticles-module_authorListing__1EFg4 span.RelatedArticles-module_text-muted__3b0zX {\n color: #000;\n font-weight: bold;\n}\n.RelatedArticles-module_cardDate__1wOR5 {\n color: var(--dark);\n display: block;\n background: #fff !important;\n margin-bottom: 0;\n}\n.RelatedArticles-module_imgWrapper__5Jx_4 {\n display: block;\n text-align: center;\n margin-bottom: 0.5rem;\n}\n.RelatedArticles-module_imgWrapper__5Jx_4 img {\n height: 135px;\n width: 100%;\n object-fit: cover;\n object-position: center;\n}\n@media screen and (max-width: 1064px) {\n}\n@media screen and (max-width: 968px) {\n .RelatedArticles-module_mediaContainer__10h9k {\n flex-wrap: wrap;\n }\n .RelatedArticles-module_imgWrapper__5Jx_4 {\n display: none;\n }\n .RelatedArticles-module_mediaCard__3wQbn {\n width: 100%;\n margin-bottom: 0.5rem;\n padding: 0;\n }\n .RelatedArticles-module_cardTitle__3P-Ib {\n font-size: 0.75rem;\n margin-bottom: 0;\n }\n}\n";
353
355
  var styles$1 = { "mediaContainer": "RelatedArticles-module_mediaContainer__10h9k", "mediaCard": "RelatedArticles-module_mediaCard__3wQbn", "cardTitle": "RelatedArticles-module_cardTitle__3P-Ib", "authorListing": "RelatedArticles-module_authorListing__1EFg4", "text-muted": "RelatedArticles-module_text-muted__3b0zX", "cardDate": "RelatedArticles-module_cardDate__1wOR5", "imgWrapper": "RelatedArticles-module_imgWrapper__5Jx_4" };
354
356
  styleInject_es.styleInject(css$1);
355
357
 
@@ -448,13 +450,7 @@ var getSocialShareDisableFlag = function getSocialShareDisableFlag(article) {
448
450
  return showSocialShare;
449
451
  };
450
452
 
451
- var FileSaver_min = _commonjsHelpers.createCommonjsModule(function (module, exports) {
452
- (function(a,b){b();})(_commonjsHelpers.commonjsGlobal,function(){function b(a,b){return "undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c);},d.onerror=function(){console.error("could not download file");},d.send();}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send();}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"));}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b);}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof _commonjsHelpers.commonjsGlobal&&_commonjsHelpers.commonjsGlobal.global===_commonjsHelpers.commonjsGlobal?_commonjsHelpers.commonjsGlobal:void 0,a=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href);},4E4),setTimeout(function(){e(j);},0));}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else {var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i);});}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null;},k.readAsDataURL(b);}else {var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m);},4E4);}});f.saveAs=g.saveAs=g,(module.exports=g);});
453
-
454
-
455
- });
456
-
457
- var css = ".RecommendedArticles-module_recommendTitle__2kUji {\r\n border-bottom: 2px solid var(--secondary-blue);\r\n font-size: 1.5rem;\r\n font-weight: bold;\r\n color: #0d335a;\r\n padding: 0.5rem;\r\n}\r\n.RecommendedArticles-module_recommendContainer__sZukI {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: wrap;\r\n margin: 0 -0.5rem;\r\n}\r\n.RecommendedArticles-module_recommendTop__1_yqw {\r\n margin: 0.5rem;\r\n width: 100%;\r\n flex-basis: 100%;\r\n display: flex;\r\n\r\n}\r\n.RecommendedArticles-module_recommendTopImg__1b9gu {\r\n min-width: 55%;\r\n width: 55%;\r\n height: 100%;\r\n}\r\n.RecommendedArticles-module_recommendTopImg__1b9gu img {\r\n width: 100%;\r\n height: 100%;\r\n object-fit: cover;\r\n}\r\n.RecommendedArticles-module_recommendTopBody__-13FI {\r\n margin-left: 1rem;\r\n line-height: 1.3;\r\n color: #121212;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n.RecommendedArticles-module_topTitle__2EafN {\r\n font-size: 25px;\r\n font-weight: bold;\r\n margin-bottom: 0.5rem;\r\n}\r\n.RecommendedArticles-module_topBody__2_VNi {\r\n font-size: 19px;\r\n margin-bottom: 0.5rem;\r\n}\r\n.RecommendedArticles-module_topLink__2RnXu {\r\n font-size: 19px;\r\n color: rgb(43, 43, 151);\r\n text-decoration: underline;\r\n margin-top: auto;\r\n}\r\n.RecommendedArticles-module_smContainer__4byBO {\r\n width: calc(25% - 1rem);\r\n margin: 0 0.5rem;\r\n}\r\n.RecommendedArticles-module_smImage__TYZGY img {\r\n width: 100%;\r\n}\r\n.RecommendedArticles-module_title__3q1ud {\r\n margin-top: 1rem;\r\n line-height: 1.2;\r\n color: #121212;\r\n}\r\n.RecommendedArticles-module_category__2jRto {\r\n text-transform: uppercase;\r\n font-size: 16px;\r\n letter-spacing: 2px;\r\n margin: 0.25rem 0;\r\n}\r\n\r\n/* media query */\r\n\r\n@media screen and (max-width: 1399px) {\r\n .RecommendedArticles-module_topTitle__2EafN {\r\n font-size: 21px;\r\n }\r\n .RecommendedArticles-module_topBody__2_VNi {\r\n font-size: 15px;\r\n }\r\n}\r\n@media screen and (max-width: 1191px) {\r\n .RecommendedArticles-module_topTitle__2EafN {\r\n font-size: 23px;\r\n }\r\n .RecommendedArticles-module_topBody__2_VNi,\r\n .RecommendedArticles-module_topLink__2RnXu {\r\n font-size: 17px;\r\n }\r\n}\r\n@media screen and (max-width: 968px) {\r\n .RecommendedArticles-module_topTitle__2EafN {\r\n font-size: 18px;\r\n }\r\n .RecommendedArticles-module_topBody__2_VNi,\r\n .RecommendedArticles-module_topLink__2RnXu {\r\n font-size: 15px;\r\n }\r\n}\r\n@media screen and (max-width: 768px) {\r\n .RecommendedArticles-module_recommendTop__1_yqw {\r\n flex-direction: column;\r\n }\r\n .RecommendedArticles-module_recommendTopImg__1b9gu,\r\n .RecommendedArticles-module_recommendTopBody__-13FI {\r\n width: 100%;\r\n margin: 0;\r\n }\r\n .RecommendedArticles-module_recommendTopBody__-13FI {\r\n margin-bottom: 1rem;\r\n }\r\n .RecommendedArticles-module_smContainer__4byBO {\r\n width: calc(50% - 1rem);\r\n }\r\n}";
453
+ var css = ".RecommendedArticles-module_recommendTitle__2kUji {\n border-bottom: 2px solid var(--secondary-blue);\n font-size: 1.5rem;\n font-weight: bold;\n color: #0d335a;\n padding: 0.5rem;\n}\n.RecommendedArticles-module_recommendContainer__sZukI {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n margin: 0 -0.5rem;\n}\n.RecommendedArticles-module_recommendTop__1_yqw {\n margin: 0.5rem;\n width: 100%;\n flex-basis: 100%;\n display: flex;\n\n}\n.RecommendedArticles-module_recommendTopImg__1b9gu {\n min-width: 55%;\n width: 55%;\n height: 100%;\n}\n.RecommendedArticles-module_recommendTopImg__1b9gu img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.RecommendedArticles-module_recommendTopBody__-13FI {\n margin-left: 1rem;\n line-height: 1.3;\n color: #121212;\n display: flex;\n flex-direction: column;\n}\n.RecommendedArticles-module_topTitle__2EafN {\n font-size: 25px;\n font-weight: bold;\n margin-bottom: 0.5rem;\n}\n.RecommendedArticles-module_topBody__2_VNi {\n font-size: 19px;\n margin-bottom: 0.5rem;\n}\n.RecommendedArticles-module_topLink__2RnXu {\n font-size: 19px;\n color: rgb(43, 43, 151);\n text-decoration: underline;\n margin-top: auto;\n}\n.RecommendedArticles-module_smContainer__4byBO {\n width: calc(25% - 1rem);\n margin: 0 0.5rem;\n}\n.RecommendedArticles-module_smImage__TYZGY img {\n width: 100%;\n}\n.RecommendedArticles-module_title__3q1ud {\n margin-top: 1rem;\n line-height: 1.2;\n color: #121212;\n}\n.RecommendedArticles-module_category__2jRto {\n text-transform: uppercase;\n font-size: 16px;\n letter-spacing: 2px;\n margin: 0.25rem 0;\n}\n\n/* media query */\n\n@media screen and (max-width: 1399px) {\n .RecommendedArticles-module_topTitle__2EafN {\n font-size: 21px;\n }\n .RecommendedArticles-module_topBody__2_VNi {\n font-size: 15px;\n }\n}\n@media screen and (max-width: 1191px) {\n .RecommendedArticles-module_topTitle__2EafN {\n font-size: 23px;\n }\n .RecommendedArticles-module_topBody__2_VNi,\n .RecommendedArticles-module_topLink__2RnXu {\n font-size: 17px;\n }\n}\n@media screen and (max-width: 968px) {\n .RecommendedArticles-module_topTitle__2EafN {\n font-size: 18px;\n }\n .RecommendedArticles-module_topBody__2_VNi,\n .RecommendedArticles-module_topLink__2RnXu {\n font-size: 15px;\n }\n}\n@media screen and (max-width: 768px) {\n .RecommendedArticles-module_recommendTop__1_yqw {\n flex-direction: column;\n }\n .RecommendedArticles-module_recommendTopImg__1b9gu,\n .RecommendedArticles-module_recommendTopBody__-13FI {\n width: 100%;\n margin: 0;\n }\n .RecommendedArticles-module_recommendTopBody__-13FI {\n margin-bottom: 1rem;\n }\n .RecommendedArticles-module_smContainer__4byBO {\n width: calc(50% - 1rem);\n }\n}";
458
454
  var styles = { "recommendTitle": "RecommendedArticles-module_recommendTitle__2kUji", "recommendContainer": "RecommendedArticles-module_recommendContainer__sZukI", "recommendTop": "RecommendedArticles-module_recommendTop__1_yqw", "recommendTopImg": "RecommendedArticles-module_recommendTopImg__1b9gu", "recommendTopBody": "RecommendedArticles-module_recommendTopBody__-13FI", "topTitle": "RecommendedArticles-module_topTitle__2EafN", "topBody": "RecommendedArticles-module_topBody__2_VNi", "topLink": "RecommendedArticles-module_topLink__2RnXu", "smContainer": "RecommendedArticles-module_smContainer__4byBO", "smImage": "RecommendedArticles-module_smImage__TYZGY", "title": "RecommendedArticles-module_title__3q1ud", "category": "RecommendedArticles-module_category__2jRto" };
459
455
  styleInject_es.styleInject(css);
460
456
 
@@ -465,7 +461,9 @@ var Recommended = function Recommended(props) {
465
461
  client = props.client,
466
462
  _props$index = props.index,
467
463
  index = _props$index === undefined ? 0 : _props$index,
468
- cpModificationRequired = props.cpModificationRequired;
464
+ cpModificationRequired = props.cpModificationRequired,
465
+ segmentData = props.segmentData,
466
+ setSegmentData = props.setSegmentData;
469
467
 
470
468
  var _useState = React.useState(false),
471
469
  _useState2 = slicedToArray._slicedToArray(_useState, 2),
@@ -477,10 +475,11 @@ var Recommended = function Recommended(props) {
477
475
  articles = _useState4[0],
478
476
  setArticles = _useState4[1];
479
477
 
480
- var _useState5 = React.useState(false),
478
+ var _useState5 = React.useState('loading'),
481
479
  _useState6 = slicedToArray._slicedToArray(_useState5, 2),
482
480
  loaded = _useState6[0],
483
- setLoaded = _useState6[1];
481
+ setLoaded = _useState6[1]; //loading, loaded, failed
482
+
484
483
 
485
484
  var starting = index * 5;
486
485
  var contentMapping = {
@@ -506,32 +505,48 @@ var Recommended = function Recommended(props) {
506
505
  categories: stringify._JSON$stringify(mainCategories)
507
506
  });
508
507
  }
509
- var anonymousId = analytics.user().anonymousId();
508
+
510
509
  // get users traits
511
510
  var getSegmentProfile = function () {
512
511
  var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee() {
513
- var response, data, addTaxonomyName, favoriteCategories, articlesQuery, videosQuery, podcastQuery, params, _ref2, _ref3, _articles, videos, podcasts;
512
+ var data, anonymousId, response, addTaxonomyName, favoriteCategories, articlesQuery, videosQuery, podcastQuery, params, _ref2, _ref3, _articles, videos, podcasts;
514
513
 
515
514
  return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
516
515
  while (1) {
517
516
  switch (_context.prev = _context.next) {
518
517
  case 0:
519
- _context.next = 2;
518
+ data = void 0;
519
+
520
+ if (segmentData) {
521
+ _context.next = 12;
522
+ break;
523
+ }
524
+
525
+ anonymousId = analytics.user().anonymousId();
526
+ _context.next = 5;
520
527
  return fetch('/api/getSegmentProfile', {
521
528
  method: 'POST',
522
529
  body: stringify._JSON$stringify({ anonymousId: anonymousId })
523
530
  });
524
531
 
525
- case 2:
532
+ case 5:
526
533
  response = _context.sent;
527
- _context.next = 5;
534
+ _context.next = 8;
528
535
  return response.json();
529
536
 
530
- case 5:
537
+ case 8:
531
538
  data = _context.sent;
532
539
 
540
+ setSegmentData(data);
541
+ _context.next = 13;
542
+ break;
543
+
544
+ case 12:
545
+ data = segmentData;
546
+
547
+ case 13:
533
548
  if (!(data && data.traits && data.traits.favorite_article_category)) {
534
- _context.next = 21;
549
+ _context.next = 28;
535
550
  break;
536
551
  }
537
552
 
@@ -550,8 +565,6 @@ var Recommended = function Recommended(props) {
550
565
 
551
566
  query = query + ' )';
552
567
 
553
- console.log(query);
554
-
555
568
  return query;
556
569
  };
557
570
 
@@ -564,10 +577,10 @@ var Recommended = function Recommended(props) {
564
577
  params = {
565
578
  id: article._id
566
579
  };
567
- _context.next = 15;
580
+ _context.next = 22;
568
581
  return asyncToGenerator._Promise.all([client.fetch(articlesQuery, params), client.fetch(videosQuery, params), client.fetch(podcastQuery, params)]);
569
582
 
570
- case 15:
583
+ case 22:
571
584
  _ref2 = _context.sent;
572
585
  _ref3 = slicedToArray._slicedToArray(_ref2, 3);
573
586
  _articles = _ref3[0];
@@ -587,7 +600,7 @@ var Recommended = function Recommended(props) {
587
600
  setArticles(_articles);
588
601
  }
589
602
 
590
- case 21:
603
+ case 28:
591
604
  case 'end':
592
605
  return _context.stop();
593
606
  }
@@ -608,7 +621,7 @@ var Recommended = function Recommended(props) {
608
621
 
609
622
  React.useEffect(function () {
610
623
  if (articles && articles.length > 0) {
611
- setLoaded(true);
624
+ setLoaded('loaded');
612
625
  }
613
626
  }, [articles]);
614
627
 
@@ -616,18 +629,19 @@ var Recommended = function Recommended(props) {
616
629
  try {
617
630
  analytics.ready(function () {
618
631
  setSegmentLoaded(function () {
619
- return true;
632
+ return 'loaded';
620
633
  });
621
634
  });
622
635
  } catch (err) {
623
636
  console.log(err);
637
+ setLoaded('failed');
624
638
  }
625
639
  }, []);
626
640
 
627
641
  return React__default['default'].createElement(
628
642
  'div',
629
643
  { id: 'recommended' },
630
- loaded ? React__default['default'].createElement(
644
+ loaded === 'loaded' && React__default['default'].createElement(
631
645
  React__default['default'].Fragment,
632
646
  null,
633
647
  React__default['default'].createElement(
@@ -648,7 +662,7 @@ var Recommended = function Recommended(props) {
648
662
  { className: styles.recommendTopImg },
649
663
  React__default['default'].createElement(
650
664
  'a',
651
- { href: '/view/' + article.url.current },
665
+ { href: '/view/' + article.url.current + '?utm_source=website&utm_medium=dynamic_content&utm_campaign=in_feed_unit' },
652
666
  React__default['default'].createElement('img', { src: urlFor({ source: article.thumbnail, client: client, imageHeight: 306, imageWidth: 544 }) })
653
667
  )
654
668
  ),
@@ -667,7 +681,7 @@ var Recommended = function Recommended(props) {
667
681
  ),
668
682
  React__default['default'].createElement(
669
683
  'a',
670
- { href: '/view/' + article.url.current, className: styles.topLink },
684
+ { href: '/view/' + article.url.current + '?utm_source=website&utm_medium=dynamic_content&utm_campaign=in_feed_unit', className: styles.topLink },
671
685
  '>> ',
672
686
  'Read Article'
673
687
  )
@@ -684,7 +698,7 @@ var Recommended = function Recommended(props) {
684
698
  ),
685
699
  React__default['default'].createElement(
686
700
  'a',
687
- { href: '/view/' + article.url.current },
701
+ { href: '/view/' + article.url.current + '?utm_source=website&utm_medium=dynamic_content&utm_campaign=in_feed_unit' },
688
702
  React__default['default'].createElement(
689
703
  'div',
690
704
  { className: styles.smImage },
@@ -700,7 +714,8 @@ var Recommended = function Recommended(props) {
700
714
  }
701
715
  })
702
716
  )
703
- ) : React__default['default'].createElement(
717
+ ),
718
+ loaded === 'failed' && React__default['default'].createElement(
704
719
  'section',
705
720
  { id: 'related-content-section', className: 'my-1' },
706
721
  (article.relatedArticle || RelevantTopics({ article: article })) && React__default['default'].createElement(
@@ -911,7 +926,11 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
911
926
  _props$downloadCitati = props.downloadCitation,
912
927
  downloadCitation = _props$downloadCitati === undefined ? false : _props$downloadCitati,
913
928
  _props$useSegmentReco = props.useSegmentRecommendedArticles,
914
- useSegmentRecommendedArticles = _props$useSegmentReco === undefined ? false : _props$useSegmentReco;
929
+ useSegmentRecommendedArticles = _props$useSegmentReco === undefined ? false : _props$useSegmentReco,
930
+ _props$segmentData = props.segmentData,
931
+ segmentData = _props$segmentData === undefined ? null : _props$segmentData,
932
+ _props$setSegmentData = props.setSegmentData,
933
+ setSegmentData = _props$setSegmentData === undefined ? function () {} : _props$setSegmentData;
915
934
  var sliderData = props.sliderData;
916
935
 
917
936
 
@@ -1076,7 +1095,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
1076
1095
  var downloadRIS = function downloadRIS() {
1077
1096
  var fileContent = generateRIS();
1078
1097
  var file = new File([fileContent], 'citation-' + url + '.ris', { type: 'application/x-research-info-systems;charset=utf-8' });
1079
- FileSaver_min.saveAs(file, 'citation-' + url + '.ris');
1098
+ FileSaver__default['default'].saveAs(file, 'citation-' + url + '.ris');
1080
1099
  };
1081
1100
 
1082
1101
  var RelevantTopics = function RelevantTopics() {
@@ -1146,7 +1165,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
1146
1165
  return React__default['default'].createElement(
1147
1166
  'div',
1148
1167
  null,
1149
- useSegmentRecommendedArticles ? React__default['default'].createElement(Recommended, { client: client, article: article, index: props.index, Settings: props.Settings, showRelatedArticleFallbackImage: props.showRelatedArticleFallbackImage, cpModificationRequired: cpModificationRequired }) : React__default['default'].createElement(
1168
+ useSegmentRecommendedArticles ? React__default['default'].createElement(Recommended, { segmentData: segmentData, setSegmentData: setSegmentData, client: client, article: article, index: props.index, Settings: props.Settings, showRelatedArticleFallbackImage: props.showRelatedArticleFallbackImage, cpModificationRequired: cpModificationRequired }) : React__default['default'].createElement(
1150
1169
  'section',
1151
1170
  { id: 'related-content-section', className: 'my-1' },
1152
1171
  (article.relatedArticle || RelevantTopics()) && React__default['default'].createElement(
@@ -1845,6 +1864,11 @@ var ArticleQueue = function ArticleQueue(props) {
1845
1864
  active = _useState6[0],
1846
1865
  setActive = _useState6[1];
1847
1866
 
1867
+ var _useState7 = React.useState(null),
1868
+ _useState8 = slicedToArray._slicedToArray(_useState7, 2),
1869
+ segmentData = _useState8[0],
1870
+ setSegmentData = _useState8[1];
1871
+
1848
1872
  var refreshAD = function refreshAD(path) {
1849
1873
  var activeArticle = queueData.find(function (item) {
1850
1874
  return item.url.current === path;
@@ -2066,7 +2090,9 @@ var ArticleQueue = function ArticleQueue(props) {
2066
2090
  // Passing queueData to check for single article
2067
2091
  , queueData: queueData,
2068
2092
  showRelatedArticles: showRelatedArticles,
2069
- index: index
2093
+ index: index,
2094
+ segmentData: segmentData,
2095
+ setSegmentData: setSegmentData
2070
2096
  }))
2071
2097
  );
2072
2098
  })
@@ -18,10 +18,10 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
18
18
 
19
19
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
20
20
 
21
- /*
22
- GROQ query -
23
- accepts an array of title, URL
24
- `https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
21
+ /*
22
+ GROQ query -
23
+ accepts an array of title, URL
24
+ `https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
25
25
  */
26
26
 
27
27
  var YoutubeGroup = function YoutubeGroup(props) {
@@ -4,18 +4,18 @@ var _extends = require('./extends-7c86182f.js');
4
4
  var toConsumableArray = require('./toConsumableArray-d7797c2b.js');
5
5
 
6
6
  var getContentPlacementUrl = function getContentPlacementUrl(cp) {
7
- var cp_url = '';
8
- if (cp.ancestor && typeof cp.ancestor == 'string') {
9
- cp_url += (cp_url === '' ? '' : '/') + cp.ancestor;
10
- }
7
+ var cp_url = '';
8
+ if (cp.ancestor && typeof cp.ancestor == 'string') {
9
+ cp_url += (cp_url === '' ? '' : '/') + cp.ancestor;
10
+ }
11
11
 
12
- if (!cp.ancestor && cp.parent && typeof cp.parent == 'string') {
13
- cp_url += (cp_url === '' ? '' : '/') + cp.parent;
14
- }
12
+ if (!cp.ancestor && cp.parent && typeof cp.parent == 'string') {
13
+ cp_url += (cp_url === '' ? '' : '/') + cp.parent;
14
+ }
15
15
 
16
- cp_url += (cp_url === '' ? '' : '/') + (cp.adTargetingURL ? adTargetingURL : cp.path);
16
+ cp_url += (cp_url === '' ? '' : '/') + (cp.adTargetingURL ? adTargetingURL : cp.path);
17
17
 
18
- return cp_url;
18
+ return cp_url;
19
19
  };
20
20
 
21
21
  var getTargeting = function getTargeting(props) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./extends-7c86182f.js');
4
4
  require('./toConsumableArray-d7797c2b.js');
5
- var getTargeting = require('./getTargeting-dab97fe1.js');
5
+ var getTargeting = require('./getTargeting-3c5754ac.js');
6
6
  require('./_commonjsHelpers-06173234.js');
7
7
  require('./core.get-iterator-method-5643aa10.js');
8
8
  require('./_object-pie-083f2dd6.js');
package/dist/cjs/index.js CHANGED
@@ -104,7 +104,7 @@ var VideoSeriesLandingPage = require('./VideoSeriesLandingPage.js');
104
104
  var ArticleProgramLandingPage = require('./ArticleProgramLandingPage.js');
105
105
  var ArticleSeriesLandingPage = require('./ArticleSeriesLandingPage.js');
106
106
  var Schema = require('./Schema.js');
107
- var getTargeting = require('./getTargeting-dab97fe1.js');
107
+ var getTargeting = require('./getTargeting-3c5754ac.js');
108
108
  var getKeywords = require('./getKeywords.js');
109
109
  var getQuery = require('./getQuery.js');
110
110
  require('./toConsumableArray-d7797c2b.js');
@@ -194,9 +194,10 @@ require('swr');
194
194
  require('passport-local');
195
195
  require('mysql');
196
196
  require('./md5-e1ca5797.js');
197
- require('./SeriesSlider-de93a303.js');
197
+ require('./SeriesSlider-ba0c5d1a.js');
198
198
  require('./style-inject.es-dcee06b6.js');
199
199
  require('disqus-react');
200
+ require('file-saver');
200
201
  require('react-twitter-embed');
201
202
  require('./ImageSlider-6c00b878.js');
202
203
  require('./defineProperty-e0fb52c5.js');