@mjhls/mjh-framework 1.0.974-test4 → 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.
- package/dist/cjs/AlgoliaSearch.js +18 -142
- package/dist/cjs/ArticleProgramLandingPage.js +1 -1
- package/dist/cjs/ArticleSeriesLandingPage.js +2 -2
- package/dist/cjs/Auth.js +17 -20
- package/dist/cjs/AuthWrapper.js +12 -18
- package/dist/cjs/CMEDeck.js +1 -5
- package/dist/cjs/Column1.js +1 -1
- package/dist/cjs/Column2.js +1 -1
- package/dist/cjs/Column3.js +1 -1
- package/dist/cjs/ContentCardPaginated.js +3 -2
- package/dist/cjs/DeckContent.js +1 -1
- package/dist/cjs/DeckQueuePaginated.js +2 -1
- package/dist/cjs/Dfp-9be904d5.js +1 -1
- package/dist/cjs/ExternalResources.js +1 -1
- package/dist/cjs/GridContent.js +2 -2
- package/dist/cjs/GridContentPaginated.js +4 -3
- package/dist/cjs/HamMagazine.js +1 -1
- package/dist/cjs/Header.js +1 -1
- package/dist/cjs/HorizontalArticleListing.js +1 -1
- package/dist/cjs/IssueLanding.js +3 -3
- package/dist/cjs/LeftNav.js +1 -1
- package/dist/cjs/MasterDeck.js +2 -2
- package/dist/cjs/MasterDeckPaginated.js +4 -3
- package/dist/cjs/{MediaSeriesCard-91982ed5.js → MediaSeriesCard-5bf9813e.js} +43 -65
- package/dist/cjs/MediaSeriesLanding.js +4 -4
- package/dist/cjs/MediaSeriesLandingPaginated.js +6 -5
- package/dist/cjs/NavDvm.js +1 -1
- package/dist/cjs/NavMagazine.js +1 -1
- package/dist/cjs/NavNative.js +1 -1
- package/dist/cjs/Pagination-1e0d5f1d.js +90 -0
- package/dist/cjs/PartnerDetailListing.js +30 -28
- package/dist/cjs/PartnerDetailListingPaginated.js +5 -4
- package/dist/cjs/PubSection.js +2 -2
- package/dist/cjs/QueueDeckExpanded.js +2 -2
- package/dist/cjs/QueueDeckExpandedPaginated.js +4 -3
- package/dist/cjs/Segment.js +0 -49
- package/dist/cjs/TaxonomyDescription.js +1 -1
- package/dist/cjs/VideoProgramLandingPage.js +1 -1
- package/dist/cjs/VideoSeriesLandingPage.js +2 -2
- package/dist/cjs/View.js +58 -155
- package/dist/cjs/getSerializers.js +1 -1
- package/dist/cjs/index.js +4 -3
- package/dist/cjs/ustream-api-3819e4aa.js +1 -1
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +1 -1
- package/dist/esm/AD300x250x600.js +1 -1
- package/dist/esm/AD728x90.js +1 -1
- package/dist/esm/ADFloatingFooter.js +1 -1
- package/dist/esm/ADFooter.js +1 -1
- package/dist/esm/ADGutter.js +1 -1
- package/dist/esm/ADSkyscraper.js +1 -1
- package/dist/esm/ADSponsoredResources.js +1 -1
- package/dist/esm/ADWebcast.js +1 -1
- package/dist/esm/ADWelcome.js +1 -1
- package/dist/esm/AccordionPanel.js +1 -1
- package/dist/esm/AdSlot.js +1 -1
- package/dist/esm/AdSlotsProvider.js +1 -1
- package/dist/esm/AlgoliaSearch.js +20 -144
- package/dist/esm/AlphabeticList.js +1 -1
- package/dist/esm/ArticleCarousel.js +1 -1
- package/dist/esm/ArticleProgramLandingPage.js +2 -2
- package/dist/esm/ArticleSeriesLandingPage.js +3 -3
- package/dist/esm/ArticleSeriesListing.js +1 -1
- package/dist/esm/Auth.js +18 -20
- package/dist/esm/AuthWrapper.js +13 -19
- package/dist/esm/Beam.js +1 -1
- package/dist/esm/Breadcrumbs.js +1 -1
- package/dist/esm/CMEDeck.js +2 -6
- package/dist/esm/Column1.js +2 -1
- package/dist/esm/Column2.js +2 -1
- package/dist/esm/Column3.js +2 -1
- package/dist/esm/ConferenceArticleCard.js +1 -1
- package/dist/esm/ContentCardPaginated.js +4 -3
- package/dist/esm/DeckContent.js +2 -2
- package/dist/esm/DeckQueue.js +1 -1
- package/dist/esm/DeckQueuePaginated.js +3 -2
- package/dist/esm/Dfp-102f0beb.js +1 -1
- package/dist/esm/EventsDeck.js +1 -1
- package/dist/esm/ExternalResources.js +2 -2
- package/dist/esm/Feature.js +1 -1
- package/dist/esm/ForbesHero.js +1 -1
- package/dist/esm/GridContent.js +3 -3
- package/dist/esm/GridContentPaginated.js +5 -4
- package/dist/esm/GridHero.js +1 -1
- package/dist/esm/GroupDeck.js +1 -1
- package/dist/esm/HamMagazine.js +2 -1
- package/dist/esm/Header.js +2 -1
- package/dist/esm/HealthCareProfessionalModal.js +1 -1
- package/dist/esm/Hero.js +1 -1
- package/dist/esm/HighlightenVideo.js +1 -1
- package/dist/esm/HorizontalArticleListing.js +2 -2
- package/dist/esm/HorizontalHero.js +1 -1
- package/dist/esm/IssueContentDeck.js +1 -1
- package/dist/esm/IssueDeck.js +1 -1
- package/dist/esm/IssueLanding.js +4 -4
- package/dist/esm/KMTracker.js +1 -1
- package/dist/esm/LeftNav.js +2 -1
- package/dist/esm/MasterDeck.js +3 -3
- package/dist/esm/MasterDeckPaginated.js +5 -4
- package/dist/esm/{MediaSeriesCard-da5c7499.js → MediaSeriesCard-305a9cb3.js} +43 -65
- package/dist/esm/MediaSeriesLanding.js +5 -5
- package/dist/esm/MediaSeriesLandingPaginated.js +7 -6
- package/dist/esm/NavDvm.js +2 -1
- package/dist/esm/NavMagazine.js +2 -1
- package/dist/esm/NavNative.js +2 -1
- package/dist/esm/OncliveHero.js +1 -1
- package/dist/esm/OncliveLargeHero.js +1 -1
- package/dist/esm/PageFilter.js +1 -1
- package/dist/esm/Pagination-cd21f8c2.js +82 -0
- package/dist/esm/PartnerDetailListing.js +31 -29
- package/dist/esm/PartnerDetailListingPaginated.js +6 -5
- package/dist/esm/PdfDownload.js +1 -1
- package/dist/esm/PopUpModal.js +1 -1
- package/dist/esm/PubSection.js +3 -3
- package/dist/esm/PubToc.js +1 -1
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/PublicationLanding.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +3 -3
- package/dist/esm/QueueDeckExpandedPaginated.js +5 -4
- package/dist/esm/RecentNews.js +1 -1
- package/dist/esm/RelatedContent.js +1 -1
- package/dist/esm/RelatedTopicsDropdown.js +1 -1
- package/dist/esm/RolesDeck.js +1 -1
- package/dist/esm/Schema.js +1 -1
- package/dist/esm/Search.js +1 -1
- package/dist/esm/Segment.js +2 -51
- package/dist/esm/SeriesListingDeck.js +1 -1
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +1 -1
- package/dist/esm/SocialIcons.js +1 -1
- package/dist/esm/SocialShare.js +1 -1
- package/dist/esm/TaxonomyCard.js +1 -1
- package/dist/esm/TaxonomyDescription.js +2 -2
- package/dist/esm/TemplateNormal.js +1 -1
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/Ustream.js +1 -1
- package/dist/esm/VerticalHero.js +1 -1
- package/dist/esm/VideoProgramLandingPage.js +2 -2
- package/dist/esm/VideoSeriesCard.js +1 -1
- package/dist/esm/VideoSeriesFilter.js +1 -1
- package/dist/esm/VideoSeriesLandingPage.js +3 -3
- package/dist/esm/VideoSeriesListing.js +1 -1
- package/dist/esm/View.js +58 -156
- package/dist/esm/YahooHero.js +1 -1
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/getKeywords.js +1 -1
- package/dist/esm/getQuery.js +1 -1
- package/dist/esm/getRelatedArticle.js +1 -1
- package/dist/esm/getRootDocGroup.js +1 -1
- package/dist/esm/getSerializers.js +1 -1
- package/dist/esm/getSeriesDetail.js +1 -1
- package/dist/esm/index.js +4 -3
- package/dist/esm/stringify-2b084bee.js +1 -1
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/urlFor.js +1 -1
- package/dist/esm/ustream-api-d3714624.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/Pagination-2a3d0103.js +0 -97
- package/dist/esm/Pagination-dc30727b.js +0 -90
- /package/dist/cjs/{ADInfeed-e87afe8a.js → ADInfeed-81006615.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-b5a3d436.js → ADlgInfeed-0db07099.js} +0 -0
- /package/dist/cjs/{index-f064c482.js → index-eb1c583d.js} +0 -0
- /package/dist/esm/{ADInfeed-5765a73a.js → ADInfeed-6d1fc6bf.js} +0 -0
- /package/dist/esm/{ADlgInfeed-5e36f317.js → ADlgInfeed-dc36c928.js} +0 -0
- /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-
|
|
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-
|
|
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
|
|
173
|
+
export default VideoSeriesLandingPage;
|
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-
|
|
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
|
|
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,152 +475,65 @@ 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]; //
|
|
478
|
+
setLoaded = _useState6[1]; //loading, loaded, failed
|
|
484
479
|
|
|
485
480
|
|
|
486
|
-
var _useState7 = useState(''),
|
|
487
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
488
|
-
anonId = _useState8[0],
|
|
489
|
-
setAnonId = _useState8[1];
|
|
490
|
-
|
|
491
481
|
var starting = index * 5;
|
|
492
482
|
var contentMapping = {
|
|
493
483
|
videos: 'video',
|
|
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) {
|
|
500
491
|
return cp.name;
|
|
501
492
|
}).sort();
|
|
502
|
-
|
|
503
|
-
var id = analytics.user().anonymousId();
|
|
504
|
-
setAnonId(id);
|
|
505
|
-
}, []);
|
|
493
|
+
|
|
506
494
|
useEffect(function () {
|
|
507
495
|
try {
|
|
508
496
|
if (!segmentLoaded) {
|
|
509
497
|
return;
|
|
510
498
|
}
|
|
511
499
|
if (mainCategories.length > 0) {
|
|
500
|
+
//console.log(mainCategories)
|
|
512
501
|
analytics.track('Article Category Viewed', {
|
|
513
502
|
categories: _JSON$stringify(mainCategories)
|
|
514
503
|
});
|
|
515
504
|
}
|
|
516
505
|
|
|
517
|
-
// const trackedEmailRecs = async (anonId, docGroupRef) => {
|
|
518
|
-
// const articleRecs = await client.fetch(`*[_type == 'article' && documentGroup._ref == '${docGroupRef}']`)
|
|
519
|
-
// const ids = await fetch('/api/getIds', {
|
|
520
|
-
// method: 'POST',
|
|
521
|
-
// body: JSON.stringify({ anonymousId: anonId })
|
|
522
|
-
// })
|
|
523
|
-
// const externalIds = await ids.json()
|
|
524
|
-
// const slicedEmails = emailData.default.emails
|
|
525
|
-
// if (externalIds && externalIds.data) {
|
|
526
|
-
// slicedEmails.forEach(obj => {
|
|
527
|
-
// externalIds.data.forEach(idObj => {
|
|
528
|
-
// idObj.id === obj.email ? setArticles(articleRecs.slice(0, 5)) : null
|
|
529
|
-
// })
|
|
530
|
-
// })
|
|
531
|
-
// }
|
|
532
|
-
// }
|
|
533
|
-
var docGroupRecs = function () {
|
|
534
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(docGroupRef) {
|
|
535
|
-
var articleRecs;
|
|
536
|
-
return regenerator.wrap(function _callee$(_context) {
|
|
537
|
-
while (1) {
|
|
538
|
-
switch (_context.prev = _context.next) {
|
|
539
|
-
case 0:
|
|
540
|
-
_context.next = 2;
|
|
541
|
-
return client.fetch('*[_type == \'article\' && documentGroup._ref == \'' + docGroupRef + '\']');
|
|
542
|
-
|
|
543
|
-
case 2:
|
|
544
|
-
articleRecs = _context.sent;
|
|
545
|
-
|
|
546
|
-
console.log('articleRecs', articleRecs);
|
|
547
|
-
if (articleRecs) setArticles(articleRecs.slice(0, 5));
|
|
548
|
-
|
|
549
|
-
case 5:
|
|
550
|
-
case 'end':
|
|
551
|
-
return _context.stop();
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
}, _callee, _this$2);
|
|
555
|
-
}));
|
|
556
|
-
|
|
557
|
-
return function docGroupRecs(_x) {
|
|
558
|
-
return _ref.apply(this, arguments);
|
|
559
|
-
};
|
|
560
|
-
}();
|
|
561
506
|
// get users traits
|
|
562
507
|
var getSegmentProfile = function () {
|
|
563
|
-
var
|
|
564
|
-
var
|
|
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;
|
|
565
510
|
|
|
566
|
-
return regenerator.wrap(function
|
|
511
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
567
512
|
while (1) {
|
|
568
|
-
switch (
|
|
513
|
+
switch (_context.prev = _context.next) {
|
|
569
514
|
case 0:
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
// const anonymousId = analytics.user().anonymousId()
|
|
573
|
-
// console.log('anonymousId', anonymousId)
|
|
574
|
-
|
|
575
|
-
console.log('anonId', anonId);
|
|
576
|
-
|
|
577
|
-
_context2.next = 4;
|
|
578
|
-
return fetch('/api/getTraits', {
|
|
579
|
-
method: 'POST',
|
|
580
|
-
// body: JSON.stringify({ anonymousId: anonymousId })
|
|
581
|
-
body: _JSON$stringify({ anonymousId: anonId })
|
|
582
|
-
});
|
|
583
|
-
|
|
584
|
-
case 4:
|
|
585
|
-
traits = _context2.sent;
|
|
586
|
-
_context2.next = 7;
|
|
587
|
-
return traits.json();
|
|
588
|
-
|
|
589
|
-
case 7:
|
|
590
|
-
traitData = _context2.sent;
|
|
591
|
-
|
|
592
|
-
console.log('persona result:', traitData);
|
|
593
|
-
|
|
594
|
-
if (!(traitData.traits && traitData.traits.groupId)) {
|
|
595
|
-
_context2.next = 13;
|
|
596
|
-
break;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
try {
|
|
600
|
-
docGroupRecs(traitData.traits.groupId);
|
|
601
|
-
} catch (e) {
|
|
602
|
-
if (e) console.log('Error: ' + e);
|
|
603
|
-
}
|
|
604
|
-
_context2.next = 54;
|
|
605
|
-
break;
|
|
606
|
-
|
|
607
|
-
case 13:
|
|
608
|
-
_context2.next = 15;
|
|
515
|
+
anonymousId = analytics.user().anonymousId();
|
|
516
|
+
_context.next = 3;
|
|
609
517
|
return fetch('/api/getSegmentProfile', {
|
|
610
518
|
method: 'POST',
|
|
611
|
-
|
|
612
|
-
body: _JSON$stringify({ anonymousId: anonId })
|
|
613
|
-
|
|
519
|
+
body: _JSON$stringify({ anonymousId: anonymousId })
|
|
614
520
|
});
|
|
615
521
|
|
|
616
|
-
case
|
|
617
|
-
response =
|
|
618
|
-
|
|
522
|
+
case 3:
|
|
523
|
+
response = _context.sent;
|
|
524
|
+
_context.next = 6;
|
|
619
525
|
return response.json();
|
|
620
526
|
|
|
621
|
-
case
|
|
622
|
-
data =
|
|
527
|
+
case 6:
|
|
528
|
+
data = _context.sent;
|
|
623
529
|
|
|
624
|
-
if (!(data && data.traits && data.traits.
|
|
625
|
-
|
|
530
|
+
if (!(data && data.traits && data.traits.favorite_article_category)) {
|
|
531
|
+
_context.next = 40;
|
|
626
532
|
break;
|
|
627
533
|
}
|
|
628
534
|
|
|
535
|
+
//console.log('%csegment user profile', 'font-size:1.5rem;color:#000000;padding:1rem;background-color:yellow;', data.traits)
|
|
536
|
+
|
|
629
537
|
addTaxonomyName = function addTaxonomyName(taxArr) {
|
|
630
538
|
if (!taxArr) return '';
|
|
631
539
|
var query = ' && ( ';
|
|
@@ -642,32 +550,30 @@ var Recommended = function Recommended(props) {
|
|
|
642
550
|
return query;
|
|
643
551
|
};
|
|
644
552
|
|
|
645
|
-
|
|
646
|
-
console.log('in data conditional');
|
|
647
|
-
favoriteCategories = JSON.parse(data.traits.most_frequent_category);
|
|
553
|
+
favoriteCategories = JSON.parse(data.traits.favorite_article_category);
|
|
648
554
|
|
|
649
|
-
//
|
|
555
|
+
//grab contentCategory ID
|
|
650
556
|
|
|
651
|
-
|
|
557
|
+
_context.next = 12;
|
|
652
558
|
return client.fetch("*[_type == 'contentCategory' && name == 'Articles'][0]{_id}");
|
|
653
559
|
|
|
654
|
-
case
|
|
655
|
-
articlesCategory =
|
|
656
|
-
|
|
560
|
+
case 12:
|
|
561
|
+
articlesCategory = _context.sent;
|
|
562
|
+
_context.next = 15;
|
|
657
563
|
return client.fetch("*[_type == 'contentCategory' && name == 'Videos'][0]{_id}");
|
|
658
564
|
|
|
659
|
-
case
|
|
660
|
-
videosCategory =
|
|
661
|
-
|
|
565
|
+
case 15:
|
|
566
|
+
videosCategory = _context.sent;
|
|
567
|
+
_context.next = 18;
|
|
662
568
|
return client.fetch("*[_type == 'contentCategory' && name == 'Podcasts'][0]{_id}");
|
|
663
569
|
|
|
664
|
-
case
|
|
665
|
-
podcastCategory =
|
|
666
|
-
|
|
570
|
+
case 18:
|
|
571
|
+
podcastCategory = _context.sent;
|
|
572
|
+
_context.next = 21;
|
|
667
573
|
return client.fetch('*[_type == \'taxonomy\' ' + addTaxonomyName(favoriteCategories) + ']');
|
|
668
574
|
|
|
669
|
-
case
|
|
670
|
-
taxonomyCategories =
|
|
575
|
+
case 21:
|
|
576
|
+
taxonomyCategories = _context.sent;
|
|
671
577
|
taxonomies = '';
|
|
672
578
|
|
|
673
579
|
taxonomyCategories.forEach(function (taxonomy, index) {
|
|
@@ -680,25 +586,23 @@ var Recommended = function Recommended(props) {
|
|
|
680
586
|
taxonomies = taxonomies + ' )';
|
|
681
587
|
|
|
682
588
|
// grab 3 articles from sanity different from the one currently being read
|
|
683
|
-
articlesQuery = '*[_type == \'article\'\n
|
|
684
|
-
videosQuery = '*[_type == \'article\'\n
|
|
685
|
-
podcastQuery = '*[_type == \'article\'\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 }';
|
|
686
592
|
params = {
|
|
687
593
|
id: article._id
|
|
688
594
|
};
|
|
689
|
-
|
|
595
|
+
_context.next = 31;
|
|
690
596
|
return _Promise.all([client.fetch(articlesQuery, params), client.fetch(videosQuery, params), client.fetch(podcastQuery, params)]);
|
|
691
597
|
|
|
692
|
-
case
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
_articles =
|
|
696
|
-
videos =
|
|
697
|
-
podcasts =
|
|
598
|
+
case 31:
|
|
599
|
+
_ref2 = _context.sent;
|
|
600
|
+
_ref3 = _slicedToArray(_ref2, 3);
|
|
601
|
+
_articles = _ref3[0];
|
|
602
|
+
videos = _ref3[1];
|
|
603
|
+
podcasts = _ref3[2];
|
|
698
604
|
|
|
699
|
-
if (_articles.length === 0)
|
|
700
|
-
setLoaded('failed');
|
|
701
|
-
}
|
|
605
|
+
if (_articles.length === 0) setLoaded('failed');
|
|
702
606
|
if (_articles) {
|
|
703
607
|
if (videos[0] && _articles[2]) {
|
|
704
608
|
_articles[2] = videos[0];
|
|
@@ -711,26 +615,24 @@ var Recommended = function Recommended(props) {
|
|
|
711
615
|
}
|
|
712
616
|
setArticles(_articles);
|
|
713
617
|
}
|
|
714
|
-
|
|
618
|
+
_context.next = 41;
|
|
715
619
|
break;
|
|
716
620
|
|
|
717
|
-
case
|
|
621
|
+
case 40:
|
|
718
622
|
setLoaded('failed');
|
|
719
623
|
|
|
720
|
-
case
|
|
624
|
+
case 41:
|
|
721
625
|
case 'end':
|
|
722
|
-
return
|
|
626
|
+
return _context.stop();
|
|
723
627
|
}
|
|
724
628
|
}
|
|
725
|
-
},
|
|
629
|
+
}, _callee, _this$2);
|
|
726
630
|
}));
|
|
727
631
|
|
|
728
632
|
return function getSegmentProfile() {
|
|
729
|
-
return
|
|
633
|
+
return _ref.apply(this, arguments);
|
|
730
634
|
};
|
|
731
635
|
}();
|
|
732
|
-
// Segment.createGroup('9e4fb278-daa9-448a-bf46-d168085d9126', anonymousId, 'onclive_test3')
|
|
733
|
-
Segment.identifyWithGroup('9e4fb278-daa9-448a-bf46-d168085d9126', anonId);
|
|
734
636
|
|
|
735
637
|
getSegmentProfile();
|
|
736
638
|
} catch (err) {
|
|
@@ -814,7 +716,7 @@ var Recommended = function Recommended(props) {
|
|
|
814
716
|
React__default.createElement(
|
|
815
717
|
'div',
|
|
816
718
|
{ className: styles.category },
|
|
817
|
-
contentMapping
|
|
719
|
+
contentMapping[article.contentCategory.name.toLowerCase()] ? contentMapping[article.contentCategory.name.toLowerCase()] : article.contentCategory.name
|
|
818
720
|
),
|
|
819
721
|
React__default.createElement(
|
|
820
722
|
'a',
|
|
@@ -1227,7 +1129,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1227
1129
|
var downloadRIS = function downloadRIS() {
|
|
1228
1130
|
var fileContent = generateRIS();
|
|
1229
1131
|
var file = new File([fileContent], 'citation-' + url + '.ris', { type: 'application/x-research-info-systems;charset=utf-8' });
|
|
1230
|
-
|
|
1132
|
+
FileSaver.saveAs(file, 'citation-' + url + '.ris');
|
|
1231
1133
|
};
|
|
1232
1134
|
|
|
1233
1135
|
var RelevantTopics = function RelevantTopics() {
|
|
@@ -2583,4 +2485,4 @@ View.returnGetInitialProps = function () {
|
|
|
2583
2485
|
};
|
|
2584
2486
|
}();
|
|
2585
2487
|
|
|
2586
|
-
export
|
|
2488
|
+
export default View;
|
package/dist/esm/YahooHero.js
CHANGED
package/dist/esm/YoutubeGroup.js
CHANGED
package/dist/esm/getKeywords.js
CHANGED
package/dist/esm/getQuery.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './extends-6d8e3924.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { g as default } from './index-
|
|
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';
|
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-
|
|
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-
|
|
134
|
+
import './ADInfeed-6d1fc6bf.js';
|
|
135
135
|
import './lodash-f97fd99a.js';
|
|
136
|
-
import './ADlgInfeed-
|
|
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 {
|
|
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 });
|
package/dist/esm/urlFor.js
CHANGED