@mjhls/mjh-framework 1.0.974-test5 → 1.0.974

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 (165) hide show
  1. package/dist/cjs/AlgoliaSearch.js +18 -142
  2. package/dist/cjs/ArticleProgramLandingPage.js +1 -1
  3. package/dist/cjs/ArticleSeriesLandingPage.js +2 -2
  4. package/dist/cjs/Auth.js +17 -20
  5. package/dist/cjs/AuthWrapper.js +12 -18
  6. package/dist/cjs/CMEDeck.js +1 -5
  7. package/dist/cjs/Column1.js +1 -1
  8. package/dist/cjs/Column2.js +1 -1
  9. package/dist/cjs/Column3.js +1 -1
  10. package/dist/cjs/ContentCardPaginated.js +3 -2
  11. package/dist/cjs/DeckContent.js +1 -1
  12. package/dist/cjs/DeckQueuePaginated.js +2 -1
  13. package/dist/cjs/Dfp-9be904d5.js +1 -1
  14. package/dist/cjs/ExternalResources.js +1 -1
  15. package/dist/cjs/GridContent.js +2 -2
  16. package/dist/cjs/GridContentPaginated.js +4 -3
  17. package/dist/cjs/HamMagazine.js +1 -1
  18. package/dist/cjs/Header.js +1 -1
  19. package/dist/cjs/HorizontalArticleListing.js +1 -1
  20. package/dist/cjs/IssueLanding.js +3 -3
  21. package/dist/cjs/LeftNav.js +1 -1
  22. package/dist/cjs/MasterDeck.js +2 -2
  23. package/dist/cjs/MasterDeckPaginated.js +4 -3
  24. package/dist/cjs/{MediaSeriesCard-91982ed5.js → MediaSeriesCard-5bf9813e.js} +43 -65
  25. package/dist/cjs/MediaSeriesLanding.js +4 -4
  26. package/dist/cjs/MediaSeriesLandingPaginated.js +6 -5
  27. package/dist/cjs/NavDvm.js +1 -1
  28. package/dist/cjs/NavMagazine.js +1 -1
  29. package/dist/cjs/NavNative.js +1 -1
  30. package/dist/cjs/Pagination-1e0d5f1d.js +90 -0
  31. package/dist/cjs/PartnerDetailListing.js +30 -28
  32. package/dist/cjs/PartnerDetailListingPaginated.js +5 -4
  33. package/dist/cjs/PubSection.js +2 -2
  34. package/dist/cjs/QueueDeckExpanded.js +2 -2
  35. package/dist/cjs/QueueDeckExpandedPaginated.js +4 -3
  36. package/dist/cjs/Segment.js +0 -49
  37. package/dist/cjs/TaxonomyDescription.js +1 -1
  38. package/dist/cjs/VideoProgramLandingPage.js +1 -1
  39. package/dist/cjs/VideoSeriesLandingPage.js +2 -2
  40. package/dist/cjs/View.js +55 -144
  41. package/dist/cjs/getSerializers.js +1 -1
  42. package/dist/cjs/index.js +4 -3
  43. package/dist/cjs/ustream-api-3819e4aa.js +1 -1
  44. package/dist/esm/AD.js +1 -1
  45. package/dist/esm/AD300x250.js +1 -1
  46. package/dist/esm/AD300x250x600.js +1 -1
  47. package/dist/esm/AD728x90.js +1 -1
  48. package/dist/esm/ADFloatingFooter.js +1 -1
  49. package/dist/esm/ADFooter.js +1 -1
  50. package/dist/esm/ADGutter.js +1 -1
  51. package/dist/esm/ADSkyscraper.js +1 -1
  52. package/dist/esm/ADSponsoredResources.js +1 -1
  53. package/dist/esm/ADWebcast.js +1 -1
  54. package/dist/esm/ADWelcome.js +1 -1
  55. package/dist/esm/AccordionPanel.js +1 -1
  56. package/dist/esm/AdSlot.js +1 -1
  57. package/dist/esm/AdSlotsProvider.js +1 -1
  58. package/dist/esm/AlgoliaSearch.js +20 -144
  59. package/dist/esm/AlphabeticList.js +1 -1
  60. package/dist/esm/ArticleCarousel.js +1 -1
  61. package/dist/esm/ArticleProgramLandingPage.js +2 -2
  62. package/dist/esm/ArticleSeriesLandingPage.js +3 -3
  63. package/dist/esm/ArticleSeriesListing.js +1 -1
  64. package/dist/esm/Auth.js +18 -20
  65. package/dist/esm/AuthWrapper.js +13 -19
  66. package/dist/esm/Beam.js +1 -1
  67. package/dist/esm/Breadcrumbs.js +1 -1
  68. package/dist/esm/CMEDeck.js +2 -6
  69. package/dist/esm/Column1.js +2 -1
  70. package/dist/esm/Column2.js +2 -1
  71. package/dist/esm/Column3.js +2 -1
  72. package/dist/esm/ConferenceArticleCard.js +1 -1
  73. package/dist/esm/ContentCardPaginated.js +4 -3
  74. package/dist/esm/DeckContent.js +2 -2
  75. package/dist/esm/DeckQueue.js +1 -1
  76. package/dist/esm/DeckQueuePaginated.js +3 -2
  77. package/dist/esm/Dfp-102f0beb.js +1 -1
  78. package/dist/esm/EventsDeck.js +1 -1
  79. package/dist/esm/ExternalResources.js +2 -2
  80. package/dist/esm/Feature.js +1 -1
  81. package/dist/esm/ForbesHero.js +1 -1
  82. package/dist/esm/GridContent.js +3 -3
  83. package/dist/esm/GridContentPaginated.js +5 -4
  84. package/dist/esm/GridHero.js +1 -1
  85. package/dist/esm/GroupDeck.js +1 -1
  86. package/dist/esm/HamMagazine.js +2 -1
  87. package/dist/esm/Header.js +2 -1
  88. package/dist/esm/HealthCareProfessionalModal.js +1 -1
  89. package/dist/esm/Hero.js +1 -1
  90. package/dist/esm/HighlightenVideo.js +1 -1
  91. package/dist/esm/HorizontalArticleListing.js +2 -2
  92. package/dist/esm/HorizontalHero.js +1 -1
  93. package/dist/esm/IssueContentDeck.js +1 -1
  94. package/dist/esm/IssueDeck.js +1 -1
  95. package/dist/esm/IssueLanding.js +4 -4
  96. package/dist/esm/KMTracker.js +1 -1
  97. package/dist/esm/LeftNav.js +2 -1
  98. package/dist/esm/MasterDeck.js +3 -3
  99. package/dist/esm/MasterDeckPaginated.js +5 -4
  100. package/dist/esm/{MediaSeriesCard-da5c7499.js → MediaSeriesCard-305a9cb3.js} +43 -65
  101. package/dist/esm/MediaSeriesLanding.js +5 -5
  102. package/dist/esm/MediaSeriesLandingPaginated.js +7 -6
  103. package/dist/esm/NavDvm.js +2 -1
  104. package/dist/esm/NavMagazine.js +2 -1
  105. package/dist/esm/NavNative.js +2 -1
  106. package/dist/esm/OncliveHero.js +1 -1
  107. package/dist/esm/OncliveLargeHero.js +1 -1
  108. package/dist/esm/PageFilter.js +1 -1
  109. package/dist/esm/Pagination-cd21f8c2.js +82 -0
  110. package/dist/esm/PartnerDetailListing.js +31 -29
  111. package/dist/esm/PartnerDetailListingPaginated.js +6 -5
  112. package/dist/esm/PdfDownload.js +1 -1
  113. package/dist/esm/PopUpModal.js +1 -1
  114. package/dist/esm/PubSection.js +3 -3
  115. package/dist/esm/PubToc.js +1 -1
  116. package/dist/esm/PublicationDeck.js +1 -1
  117. package/dist/esm/PublicationLanding.js +1 -1
  118. package/dist/esm/QueueDeckExpanded.js +3 -3
  119. package/dist/esm/QueueDeckExpandedPaginated.js +5 -4
  120. package/dist/esm/RecentNews.js +1 -1
  121. package/dist/esm/RelatedContent.js +1 -1
  122. package/dist/esm/RelatedTopicsDropdown.js +1 -1
  123. package/dist/esm/RolesDeck.js +1 -1
  124. package/dist/esm/Schema.js +1 -1
  125. package/dist/esm/Search.js +1 -1
  126. package/dist/esm/Segment.js +2 -51
  127. package/dist/esm/SeriesListingDeck.js +1 -1
  128. package/dist/esm/SetCookie.js +1 -1
  129. package/dist/esm/SideFooter.js +1 -1
  130. package/dist/esm/SocialIcons.js +1 -1
  131. package/dist/esm/SocialShare.js +1 -1
  132. package/dist/esm/TaxonomyCard.js +1 -1
  133. package/dist/esm/TaxonomyDescription.js +2 -2
  134. package/dist/esm/TemplateNormal.js +1 -1
  135. package/dist/esm/ThumbnailCard.js +1 -1
  136. package/dist/esm/Ustream.js +1 -1
  137. package/dist/esm/VerticalHero.js +1 -1
  138. package/dist/esm/VideoProgramLandingPage.js +2 -2
  139. package/dist/esm/VideoSeriesCard.js +1 -1
  140. package/dist/esm/VideoSeriesFilter.js +1 -1
  141. package/dist/esm/VideoSeriesLandingPage.js +3 -3
  142. package/dist/esm/VideoSeriesListing.js +1 -1
  143. package/dist/esm/View.js +55 -145
  144. package/dist/esm/YahooHero.js +1 -1
  145. package/dist/esm/YoutubeGroup.js +1 -1
  146. package/dist/esm/getKeywords.js +1 -1
  147. package/dist/esm/getQuery.js +1 -1
  148. package/dist/esm/getRelatedArticle.js +1 -1
  149. package/dist/esm/getRootDocGroup.js +1 -1
  150. package/dist/esm/getSerializers.js +1 -1
  151. package/dist/esm/getSeriesDetail.js +1 -1
  152. package/dist/esm/index.js +4 -3
  153. package/dist/esm/stringify-2b084bee.js +1 -1
  154. package/dist/esm/timeDifferenceCalc.js +1 -1
  155. package/dist/esm/urlFor.js +1 -1
  156. package/dist/esm/ustream-api-d3714624.js +1 -1
  157. package/package.json +1 -1
  158. package/dist/cjs/Pagination-2a3d0103.js +0 -97
  159. package/dist/esm/Pagination-dc30727b.js +0 -90
  160. /package/dist/cjs/{ADInfeed-e87afe8a.js → ADInfeed-81006615.js} +0 -0
  161. /package/dist/cjs/{ADlgInfeed-b5a3d436.js → ADlgInfeed-0db07099.js} +0 -0
  162. /package/dist/cjs/{index-f064c482.js → index-eb1c583d.js} +0 -0
  163. /package/dist/esm/{ADInfeed-5765a73a.js → ADInfeed-6d1fc6bf.js} +0 -0
  164. /package/dist/esm/{ADlgInfeed-5e36f317.js → ADlgInfeed-dc36c928.js} +0 -0
  165. /package/dist/esm/{index-8f118089.js → index-264bbd3c.js} +0 -0
@@ -36,13 +36,13 @@ import './index.es-a6137319.js';
36
36
  import './visibility-sensor-72fd8f8b.js';
37
37
  import 'react-dom';
38
38
  import './index-3f5c03b2.js';
39
- import './ADlgInfeed-5e36f317.js';
39
+ import './ADlgInfeed-dc36c928.js';
40
40
  import './AdSlot.js';
41
41
  import './Beam.js';
42
42
  import './stringify-2b084bee.js';
43
43
  import './Segment.js';
44
44
  import './main-1894c974.js';
45
- import './ADInfeed-5765a73a.js';
45
+ import './ADInfeed-6d1fc6bf.js';
46
46
  import './index-755f2cc2.js';
47
47
  import './urlFor.js';
48
48
  import './style-inject.es-1f59c1d0.js';
@@ -170,4 +170,4 @@ VideoSeriesLandingPage.getInitialData = function () {
170
170
  };
171
171
  }();
172
172
 
173
- export { VideoSeriesLandingPage as default };
173
+ export default VideoSeriesLandingPage;
@@ -413,4 +413,4 @@ var VideoSeriesListing = function (_React$Component) {
413
413
 
414
414
  var VideoSeriesListing$1 = withRouter(VideoSeriesListing);
415
415
 
416
- export { VideoSeriesListing$1 as default };
416
+ export default VideoSeriesListing$1;
package/dist/esm/View.js CHANGED
@@ -15,7 +15,7 @@ import FormControl from 'react-bootstrap/FormControl';
15
15
  import Button from 'react-bootstrap/Button';
16
16
  import { V as VisibilitySensor } from './visibility-sensor-72fd8f8b.js';
17
17
  import SocialShare from './SocialShare.js';
18
- import { r as renderAuthor, g as getSerializers } from './index-8f118089.js';
18
+ import { r as renderAuthor, g as getSerializers } from './index-264bbd3c.js';
19
19
  import DFPAdSlot from './AdSlot.js';
20
20
  import { S as SeriesSlider } from './SeriesSlider-f771e20d.js';
21
21
  import { a as getContentPlacementUrl, g as getTargeting } from './getTargeting-42f9b439.js';
@@ -28,15 +28,15 @@ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
28
28
  import './index-755f2cc2.js';
29
29
  import { DiscussionEmbed } from 'disqus-react';
30
30
  import Schema from './Schema.js';
31
- import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
31
+ import FileSaver from 'file-saver';
32
32
  import { PixelTrackingArticle } from './PixelTracking.js';
33
- import Segment from './Segment.js';
34
33
  import { _ as _Object$keys } from './keys-31dcdb31.js';
35
34
  import { I as InfiniteScroll } from './index.es-a6137319.js';
36
35
  import { l as lib_3 } from './index-f0fc23eb.js';
37
36
  import getRelatedArticle from './getRelatedArticle.js';
38
37
  import getQuery from './getQuery.js';
39
38
  import getSeriesDetail from './getSeriesDetail.js';
39
+ import './_commonjsHelpers-0c4b6f40.js';
40
40
  import './core.get-iterator-method-ea258bb1.js';
41
41
  import './web.dom.iterable-ab4dea5c.js';
42
42
  import './_library-528f1934.js';
@@ -50,6 +50,7 @@ import 'react-bootstrap';
50
50
  import './index-c7e2ac95.js';
51
51
  import './util-8ed16d48.js';
52
52
  import './Beam.js';
53
+ import './Segment.js';
53
54
  import './brightcove-react-player-loader.es-57a70a56.js';
54
55
  import 'react-bootstrap/Modal';
55
56
  import 'react-ga';
@@ -448,12 +449,6 @@ var getSocialShareDisableFlag = function getSocialShareDisableFlag(article) {
448
449
  return showSocialShare;
449
450
  };
450
451
 
451
- var FileSaver_min = createCommonjsModule(function (module, exports) {
452
- (function(a,b){b();})(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 commonjsGlobal&&commonjsGlobal.global===commonjsGlobal?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
452
  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
453
  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
454
  styleInject(css);
@@ -480,13 +475,8 @@ var Recommended = function Recommended(props) {
480
475
  var _useState5 = useState('loading'),
481
476
  _useState6 = _slicedToArray(_useState5, 2),
482
477
  loaded = _useState6[0],
483
- setLoaded = _useState6[1]; // loading, loaded, failed
484
-
478
+ setLoaded = _useState6[1]; //loading, loaded, failed
485
479
 
486
- var _useState7 = useState(''),
487
- _useState8 = _slicedToArray(_useState7, 2),
488
- anonId = _useState8[0];
489
- _useState8[1];
490
480
 
491
481
  var starting = index * 5;
492
482
  var contentMapping = {
@@ -494,6 +484,7 @@ var Recommended = function Recommended(props) {
494
484
  articles: 'article',
495
485
  podcasts: 'podcast'
496
486
  };
487
+
497
488
  var mainCategories = article.content_placement.filter(function (cp) {
498
489
  return cp.usedForRecommendations === true;
499
490
  }).map(function (cp) {
@@ -506,118 +497,43 @@ var Recommended = function Recommended(props) {
506
497
  return;
507
498
  }
508
499
  if (mainCategories.length > 0) {
500
+ //console.log(mainCategories)
509
501
  analytics.track('Article Category Viewed', {
510
502
  categories: _JSON$stringify(mainCategories)
511
503
  });
512
504
  }
513
505
 
514
- // const trackedEmailRecs = async (anonId, docGroupRef) => {
515
- // const articleRecs = await client.fetch(`*[_type == 'article' && documentGroup._ref == '${docGroupRef}']`)
516
- // const ids = await fetch('/api/getIds', {
517
- // method: 'POST',
518
- // body: JSON.stringify({ anonymousId: anonId })
519
- // })
520
- // const externalIds = await ids.json()
521
- // const slicedEmails = emailData.default.emails
522
- // if (externalIds && externalIds.data) {
523
- // slicedEmails.forEach(obj => {
524
- // externalIds.data.forEach(idObj => {
525
- // idObj.id === obj.email ? setArticles(articleRecs.slice(0, 5)) : null
526
- // })
527
- // })
528
- // }
529
- // }
530
- var docGroupRecs = function () {
531
- var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(docGroupRef) {
532
- var articleRecs;
533
- return regenerator.wrap(function _callee$(_context) {
534
- while (1) {
535
- switch (_context.prev = _context.next) {
536
- case 0:
537
- _context.next = 2;
538
- return client.fetch('*[_type == \'article\' && documentGroup._ref == \'' + docGroupRef + '\']');
539
-
540
- case 2:
541
- articleRecs = _context.sent;
542
-
543
- console.log('articleRecs', articleRecs);
544
- if (articleRecs) setArticles(articleRecs.slice(0, 5));
545
-
546
- case 5:
547
- case 'end':
548
- return _context.stop();
549
- }
550
- }
551
- }, _callee, _this$2);
552
- }));
553
-
554
- return function docGroupRecs(_x) {
555
- return _ref.apply(this, arguments);
556
- };
557
- }();
558
506
  // get users traits
559
507
  var getSegmentProfile = function () {
560
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
561
- var storedUsers, anonymousId, traits, traitData, response, data, addTaxonomyName, favoriteCategories, articlesCategory, videosCategory, podcastCategory, taxonomyCategories, taxonomies, articlesQuery, videosQuery, podcastQuery, params, _ref3, _ref4, _articles, videos, podcasts;
508
+ var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
509
+ var anonymousId, response, data, addTaxonomyName, favoriteCategories, articlesCategory, videosCategory, podcastCategory, taxonomyCategories, taxonomies, articlesQuery, videosQuery, podcastQuery, params, _ref2, _ref3, _articles, videos, podcasts;
562
510
 
563
- return regenerator.wrap(function _callee2$(_context2) {
511
+ return regenerator.wrap(function _callee$(_context) {
564
512
  while (1) {
565
- switch (_context2.prev = _context2.next) {
513
+ switch (_context.prev = _context.next) {
566
514
  case 0:
567
- storedUsers = false;
568
515
  anonymousId = analytics.user().anonymousId();
569
-
570
- console.log('anonymousId', anonymousId);
571
-
572
- _context2.next = 5;
573
- return fetch('/api/getTraits', {
574
- method: 'POST',
575
- body: _JSON$stringify({ anonymousId: anonymousId })
576
- });
577
-
578
- case 5:
579
- traits = _context2.sent;
580
- _context2.next = 8;
581
- return traits.json();
582
-
583
- case 8:
584
- traitData = _context2.sent;
585
-
586
- console.log('persona result:', traitData);
587
-
588
- if (!(traitData.traits && traitData.traits.groupId)) {
589
- _context2.next = 14;
590
- break;
591
- }
592
-
593
- try {
594
- docGroupRecs(traitData.traits.groupId);
595
- } catch (e) {
596
- if (e) console.log('Error: ' + e);
597
- }
598
- _context2.next = 55;
599
- break;
600
-
601
- case 14:
602
- _context2.next = 16;
516
+ _context.next = 3;
603
517
  return fetch('/api/getSegmentProfile', {
604
518
  method: 'POST',
605
519
  body: _JSON$stringify({ anonymousId: anonymousId })
606
520
  });
607
521
 
608
- case 16:
609
- response = _context2.sent;
610
- _context2.next = 19;
522
+ case 3:
523
+ response = _context.sent;
524
+ _context.next = 6;
611
525
  return response.json();
612
526
 
613
- case 19:
614
- data = _context2.sent;
527
+ case 6:
528
+ data = _context.sent;
615
529
 
616
- if (!(data && data.traits && data.traits.most_frequent_category)) {
617
- _context2.next = 54;
530
+ if (!(data && data.traits && data.traits.favorite_article_category)) {
531
+ _context.next = 40;
618
532
  break;
619
533
  }
620
534
 
535
+ //console.log('%csegment user profile', 'font-size:1.5rem;color:#000000;padding:1rem;background-color:yellow;', data.traits)
536
+
621
537
  addTaxonomyName = function addTaxonomyName(taxArr) {
622
538
  if (!taxArr) return '';
623
539
  var query = ' && ( ';
@@ -634,32 +550,30 @@ var Recommended = function Recommended(props) {
634
550
  return query;
635
551
  };
636
552
 
637
- // console.log('%csegment user profile', 'font-size:1.5rem;color:#000000;padding:1rem;background-color:yellow;', data.traits)
638
- console.log('in data conditional');
639
- favoriteCategories = JSON.parse(data.traits.most_frequent_category);
553
+ favoriteCategories = JSON.parse(data.traits.favorite_article_category);
640
554
 
641
- // grab contentCategory ID
555
+ //grab contentCategory ID
642
556
 
643
- _context2.next = 26;
557
+ _context.next = 12;
644
558
  return client.fetch("*[_type == 'contentCategory' && name == 'Articles'][0]{_id}");
645
559
 
646
- case 26:
647
- articlesCategory = _context2.sent;
648
- _context2.next = 29;
560
+ case 12:
561
+ articlesCategory = _context.sent;
562
+ _context.next = 15;
649
563
  return client.fetch("*[_type == 'contentCategory' && name == 'Videos'][0]{_id}");
650
564
 
651
- case 29:
652
- videosCategory = _context2.sent;
653
- _context2.next = 32;
565
+ case 15:
566
+ videosCategory = _context.sent;
567
+ _context.next = 18;
654
568
  return client.fetch("*[_type == 'contentCategory' && name == 'Podcasts'][0]{_id}");
655
569
 
656
- case 32:
657
- podcastCategory = _context2.sent;
658
- _context2.next = 35;
570
+ case 18:
571
+ podcastCategory = _context.sent;
572
+ _context.next = 21;
659
573
  return client.fetch('*[_type == \'taxonomy\' ' + addTaxonomyName(favoriteCategories) + ']');
660
574
 
661
- case 35:
662
- taxonomyCategories = _context2.sent;
575
+ case 21:
576
+ taxonomyCategories = _context.sent;
663
577
  taxonomies = '';
664
578
 
665
579
  taxonomyCategories.forEach(function (taxonomy, index) {
@@ -672,25 +586,23 @@ var Recommended = function Recommended(props) {
672
586
  taxonomies = taxonomies + ' )';
673
587
 
674
588
  // grab 3 articles from sanity different from the one currently being read
675
- articlesQuery = '*[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible == true \n && passwordLock != true\n && references(\'' + articlesCategory._id + '\')\n ' + taxonomies + '\n && defined(published)\n && _id != $id\n && dateTime(published) <= dateTime(now())] | order(published desc) [' + starting + '...' + (starting + 5) + '] {\n ...,\n title,\n thumbnail,\n url,\n contentCategory->,\n published,\n }';
676
- videosQuery = '*[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible == true \n && passwordLock != true\n && references(\'' + videosCategory._id + '\')\n ' + taxonomies + '\n && defined(published)\n && _id != $id\n && dateTime(published) <= dateTime(now())] | order(published desc) [' + starting + '...' + (starting + 1) + '] {\n ...,\n title,\n thumbnail,\n url,\n contentCategory->,\n published,\n }';
677
- podcastQuery = '*[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible == true \n && passwordLock != true\n && references(\'' + podcastCategory._id + '\')\n ' + taxonomies + '\n && defined(published)\n && _id != $id\n && dateTime(published) <= dateTime(now())] | order(published desc) [' + starting + '...' + (starting + 2) + '] {\n ...,\n title,\n thumbnail,\n url,\n contentCategory->,\n published,\n }';
589
+ articlesQuery = '*[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible == true \n && passwordLock != true\n && references(\'' + articlesCategory._id + '\')\n ' + taxonomies + '\n && defined(published)\n && _id != $id\n && dateTime(published) <= dateTime(now())] | order(published desc) [' + starting + '...' + (starting + 5) + '] {\n ...,\n title,\n thumbnail,\n url,\n contentCategory->,\n published,\n }';
590
+ videosQuery = '*[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible == true \n && passwordLock != true\n && references(\'' + videosCategory._id + '\')\n ' + taxonomies + '\n && defined(published)\n && _id != $id\n && dateTime(published) <= dateTime(now())] | order(published desc) [' + starting + '...' + (starting + 1) + '] {\n ...,\n title,\n thumbnail,\n url,\n contentCategory->,\n published,\n }';
591
+ podcastQuery = '*[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible == true \n && passwordLock != true\n && references(\'' + podcastCategory._id + '\')\n ' + taxonomies + '\n && defined(published)\n && _id != $id\n && dateTime(published) <= dateTime(now())] | order(published desc) [' + starting + '...' + (starting + 2) + '] {\n ...,\n title,\n thumbnail,\n url,\n contentCategory->,\n published,\n }';
678
592
  params = {
679
593
  id: article._id
680
594
  };
681
- _context2.next = 45;
595
+ _context.next = 31;
682
596
  return _Promise.all([client.fetch(articlesQuery, params), client.fetch(videosQuery, params), client.fetch(podcastQuery, params)]);
683
597
 
684
- case 45:
685
- _ref3 = _context2.sent;
686
- _ref4 = _slicedToArray(_ref3, 3);
687
- _articles = _ref4[0];
688
- videos = _ref4[1];
689
- podcasts = _ref4[2];
598
+ case 31:
599
+ _ref2 = _context.sent;
600
+ _ref3 = _slicedToArray(_ref2, 3);
601
+ _articles = _ref3[0];
602
+ videos = _ref3[1];
603
+ podcasts = _ref3[2];
690
604
 
691
- if (_articles.length === 0) {
692
- setLoaded('failed');
693
- }
605
+ if (_articles.length === 0) setLoaded('failed');
694
606
  if (_articles) {
695
607
  if (videos[0] && _articles[2]) {
696
608
  _articles[2] = videos[0];
@@ -703,26 +615,24 @@ var Recommended = function Recommended(props) {
703
615
  }
704
616
  setArticles(_articles);
705
617
  }
706
- _context2.next = 55;
618
+ _context.next = 41;
707
619
  break;
708
620
 
709
- case 54:
621
+ case 40:
710
622
  setLoaded('failed');
711
623
 
712
- case 55:
624
+ case 41:
713
625
  case 'end':
714
- return _context2.stop();
626
+ return _context.stop();
715
627
  }
716
628
  }
717
- }, _callee2, _this$2);
629
+ }, _callee, _this$2);
718
630
  }));
719
631
 
720
632
  return function getSegmentProfile() {
721
- return _ref2.apply(this, arguments);
633
+ return _ref.apply(this, arguments);
722
634
  };
723
635
  }();
724
- // Segment.createGroup('9e4fb278-daa9-448a-bf46-d168085d9126', anonymousId, 'onclive_test3')
725
- Segment.identifyWithGroup('9e4fb278-daa9-448a-bf46-d168085d9126', anonId);
726
636
 
727
637
  getSegmentProfile();
728
638
  } catch (err) {
@@ -806,7 +716,7 @@ var Recommended = function Recommended(props) {
806
716
  React__default.createElement(
807
717
  'div',
808
718
  { className: styles.category },
809
- contentMapping && contentMapping[article.contentCategory.name] && contentMapping[article.contentCategory.name.toLowerCase()] ? contentMapping[article.contentCategory.name.toLowerCase()] : article.contentCategory.name
719
+ contentMapping[article.contentCategory.name.toLowerCase()] ? contentMapping[article.contentCategory.name.toLowerCase()] : article.contentCategory.name
810
720
  ),
811
721
  React__default.createElement(
812
722
  'a',
@@ -1219,7 +1129,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
1219
1129
  var downloadRIS = function downloadRIS() {
1220
1130
  var fileContent = generateRIS();
1221
1131
  var file = new File([fileContent], 'citation-' + url + '.ris', { type: 'application/x-research-info-systems;charset=utf-8' });
1222
- FileSaver_min.saveAs(file, 'citation-' + url + '.ris');
1132
+ FileSaver.saveAs(file, 'citation-' + url + '.ris');
1223
1133
  };
1224
1134
 
1225
1135
  var RelevantTopics = function RelevantTopics() {
@@ -2575,4 +2485,4 @@ View.returnGetInitialProps = function () {
2575
2485
  };
2576
2486
  }();
2577
2487
 
2578
- export { View as default };
2488
+ export default View;
@@ -117,4 +117,4 @@ var YahooHero = function YahooHero(props) {
117
117
  );
118
118
  };
119
119
 
120
- export { YahooHero as default };
120
+ export default YahooHero;
@@ -362,4 +362,4 @@ var YoutubeGroup = function YoutubeGroup(props) {
362
362
  );
363
363
  };
364
364
 
365
- export { YoutubeGroup as default };
365
+ export default YoutubeGroup;
@@ -41,4 +41,4 @@ var getKeywords = function getKeywords(article) {
41
41
  return keywords;
42
42
  };
43
43
 
44
- export { getKeywords as default };
44
+ export default getKeywords;
@@ -23,4 +23,4 @@ var getQuery = function getQuery(type) {
23
23
  }
24
24
  };
25
25
 
26
- export { getQuery as default };
26
+ export default getQuery;
@@ -537,4 +537,4 @@ var getRelatedArticle = function () {
537
537
  };
538
538
  }();
539
539
 
540
- export { getRelatedArticle as default };
540
+ export default getRelatedArticle;
@@ -57,4 +57,4 @@ var getRootDocGroup = function () {
57
57
  };
58
58
  }();
59
59
 
60
- export { getRootDocGroup as default };
60
+ export default getRootDocGroup;
@@ -1,6 +1,6 @@
1
1
  import './extends-6d8e3924.js';
2
2
  import 'react';
3
- export { g as default } from './index-8f118089.js';
3
+ export { g as default } from './index-264bbd3c.js';
4
4
  import './BlockContent-1e73bd2c.js';
5
5
  import './entities-6d9154b4.js';
6
6
  import './_commonjsHelpers-0c4b6f40.js';
@@ -35,4 +35,4 @@ var getSeriesDetail = function getSeriesDetail(article, currentSeries) {
35
35
  return seriesDetail;
36
36
  };
37
37
 
38
- export { getSeriesDetail as default };
38
+ export default getSeriesDetail;
package/dist/esm/index.js CHANGED
@@ -87,7 +87,7 @@ export { default as VerticalHero } from './VerticalHero.js';
87
87
  export { default as YahooHero } from './YahooHero.js';
88
88
  export { default as GridHero } from './GridHero.js';
89
89
  export { default as ConferenceArticleCard } from './ConferenceArticleCard.js';
90
- export { g as getSerializers } from './index-8f118089.js';
90
+ export { g as getSerializers } from './index-264bbd3c.js';
91
91
  export { default as Beam } from './Beam.js';
92
92
  export { default as Segment } from './Segment.js';
93
93
  export { default as KMTracker } from './KMTracker.js';
@@ -131,9 +131,9 @@ import './visibility-sensor-72fd8f8b.js';
131
131
  import 'react-dom';
132
132
  import './main-1894c974.js';
133
133
  import './entities-6d9154b4.js';
134
- import './ADInfeed-5765a73a.js';
134
+ import './ADInfeed-6d1fc6bf.js';
135
135
  import './lodash-f97fd99a.js';
136
- import './ADlgInfeed-5e36f317.js';
136
+ import './ADlgInfeed-dc36c928.js';
137
137
  import './getContentCategory-15dcc413.js';
138
138
  import './get-3c308da4.js';
139
139
  import './eq-bdcbf886.js';
@@ -195,6 +195,7 @@ import './md5-4e42248e.js';
195
195
  import './SeriesSlider-f771e20d.js';
196
196
  import './style-inject.es-1f59c1d0.js';
197
197
  import 'disqus-react';
198
+ import 'file-saver';
198
199
  import 'react-twitter-embed';
199
200
  import './ImageSlider-f84174cb.js';
200
201
  import './defineProperty-23a8f8cd.js';
@@ -1,4 +1,4 @@
1
- import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
1
+ import { u as unwrapExports, c as createCommonjsModule } from './_commonjsHelpers-0c4b6f40.js';
2
2
  import { a as _core } from './core.get-iterator-method-ea258bb1.js';
3
3
 
4
4
  var $JSON = _core.JSON || (_core.JSON = { stringify: JSON.stringify });
@@ -34,4 +34,4 @@ var timeDifferenceCalc = function timeDifferenceCalc(articlePublishedDate) {
34
34
  return difference;
35
35
  };
36
36
 
37
- export { timeDifferenceCalc as default };
37
+ export default timeDifferenceCalc;
@@ -60,4 +60,4 @@ function urlFor(_ref) {
60
60
  return url;
61
61
  }
62
62
 
63
- export { urlFor as default };
63
+ export default urlFor;
@@ -101,4 +101,4 @@ var UstreamEmbed = function () {
101
101
  }), window.UstreamEmbed = a;
102
102
  }();
103
103
 
104
- export { UstreamEmbed as default };
104
+ export default UstreamEmbed;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.974-test5",
3
+ "version": "1.0.974",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",