@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.
- 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 +55 -144
- 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 +55 -145
- 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,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]; //
|
|
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
|
|
561
|
-
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;
|
|
562
510
|
|
|
563
|
-
return regenerator.wrap(function
|
|
511
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
564
512
|
while (1) {
|
|
565
|
-
switch (
|
|
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
|
|
609
|
-
response =
|
|
610
|
-
|
|
522
|
+
case 3:
|
|
523
|
+
response = _context.sent;
|
|
524
|
+
_context.next = 6;
|
|
611
525
|
return response.json();
|
|
612
526
|
|
|
613
|
-
case
|
|
614
|
-
data =
|
|
527
|
+
case 6:
|
|
528
|
+
data = _context.sent;
|
|
615
529
|
|
|
616
|
-
if (!(data && data.traits && data.traits.
|
|
617
|
-
|
|
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
|
-
|
|
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
|
-
//
|
|
555
|
+
//grab contentCategory ID
|
|
642
556
|
|
|
643
|
-
|
|
557
|
+
_context.next = 12;
|
|
644
558
|
return client.fetch("*[_type == 'contentCategory' && name == 'Articles'][0]{_id}");
|
|
645
559
|
|
|
646
|
-
case
|
|
647
|
-
articlesCategory =
|
|
648
|
-
|
|
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
|
|
652
|
-
videosCategory =
|
|
653
|
-
|
|
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
|
|
657
|
-
podcastCategory =
|
|
658
|
-
|
|
570
|
+
case 18:
|
|
571
|
+
podcastCategory = _context.sent;
|
|
572
|
+
_context.next = 21;
|
|
659
573
|
return client.fetch('*[_type == \'taxonomy\' ' + addTaxonomyName(favoriteCategories) + ']');
|
|
660
574
|
|
|
661
|
-
case
|
|
662
|
-
taxonomyCategories =
|
|
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
|
|
676
|
-
videosQuery = '*[_type == \'article\'\n
|
|
677
|
-
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 }';
|
|
678
592
|
params = {
|
|
679
593
|
id: article._id
|
|
680
594
|
};
|
|
681
|
-
|
|
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
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
_articles =
|
|
688
|
-
videos =
|
|
689
|
-
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];
|
|
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
|
-
|
|
618
|
+
_context.next = 41;
|
|
707
619
|
break;
|
|
708
620
|
|
|
709
|
-
case
|
|
621
|
+
case 40:
|
|
710
622
|
setLoaded('failed');
|
|
711
623
|
|
|
712
|
-
case
|
|
624
|
+
case 41:
|
|
713
625
|
case 'end':
|
|
714
|
-
return
|
|
626
|
+
return _context.stop();
|
|
715
627
|
}
|
|
716
628
|
}
|
|
717
|
-
},
|
|
629
|
+
}, _callee, _this$2);
|
|
718
630
|
}));
|
|
719
631
|
|
|
720
632
|
return function getSegmentProfile() {
|
|
721
|
-
return
|
|
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
|
|
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
|
-
|
|
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
|
|
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