@mjhls/mjh-framework 1.0.760-page-refresh → 1.0.760
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/README.md +167 -167
- package/dist/cjs/ConferenceArticleCard.js +15 -15
- package/dist/cjs/DeckContent.js +8 -8
- package/dist/cjs/EventsDeck.js +18 -18
- package/dist/cjs/ExternalResources.js +1 -1
- package/dist/cjs/HamMagazine.js +12 -12
- package/dist/cjs/IssueLanding.js +29 -29
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/MasterDeck.js +8 -8
- package/dist/cjs/NavMagazine.js +18 -38
- package/dist/cjs/NavNative.js +12 -12
- package/dist/cjs/PublicationLanding.js +33 -33
- package/dist/cjs/RelatedContent.js +28 -28
- package/dist/cjs/RelatedTopicsDropdown.js +10 -10
- package/dist/cjs/SideFooter.js +2 -2
- package/dist/cjs/VideoSeriesCard.js +1 -1
- package/dist/cjs/View.js +2 -2
- package/dist/cjs/YoutubeGroup.js +4 -4
- package/dist/cjs/{getTargeting-963303c6.js → getTargeting-497b581d.js} +9 -9
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/{index-cb6ed1fc.js → index-4d74ffd6.js} +29 -29
- package/dist/cjs/index.js +2 -2
- package/dist/esm/ConferenceArticleCard.js +15 -15
- package/dist/esm/DeckContent.js +8 -8
- package/dist/esm/EventsDeck.js +18 -18
- package/dist/esm/ExternalResources.js +1 -1
- package/dist/esm/HamMagazine.js +12 -12
- package/dist/esm/IssueLanding.js +29 -29
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/MasterDeck.js +8 -8
- package/dist/esm/NavMagazine.js +18 -38
- package/dist/esm/NavNative.js +12 -12
- package/dist/esm/PublicationLanding.js +33 -33
- package/dist/esm/RelatedContent.js +28 -28
- package/dist/esm/RelatedTopicsDropdown.js +10 -10
- package/dist/esm/SideFooter.js +2 -2
- package/dist/esm/VideoSeriesCard.js +1 -1
- package/dist/esm/View.js +2 -2
- package/dist/esm/YoutubeGroup.js +4 -4
- package/dist/esm/{getTargeting-85315091.js → getTargeting-2d402d66.js} +9 -9
- package/dist/esm/getTargeting.js +1 -1
- package/dist/esm/{index-750a7380.js → index-ccb770c7.js} +29 -29
- package/dist/esm/index.js +2 -2
- package/package.json +107 -107
package/dist/cjs/NavMagazine.js
CHANGED
|
@@ -41,16 +41,16 @@ var Navbar__default = /*#__PURE__*/_interopDefaultLegacy(Navbar);
|
|
|
41
41
|
var NavDropdown__default = /*#__PURE__*/_interopDefaultLegacy(NavDropdown);
|
|
42
42
|
|
|
43
43
|
var NavMagazine = function NavMagazine(props) {
|
|
44
|
-
/*
|
|
45
|
-
Example Nav with acceptable props
|
|
46
|
-
<MagazineNav
|
|
47
|
-
showLogin
|
|
48
|
-
user={props.cache.user}
|
|
49
|
-
logo={props.settings.logo}
|
|
50
|
-
dataObject={props.cache.mainNavCache}
|
|
51
|
-
website={website}
|
|
52
|
-
subNav={props.cache.subNavCache}
|
|
53
|
-
/>
|
|
44
|
+
/*
|
|
45
|
+
Example Nav with acceptable props
|
|
46
|
+
<MagazineNav
|
|
47
|
+
showLogin
|
|
48
|
+
user={props.cache.user}
|
|
49
|
+
logo={props.settings.logo}
|
|
50
|
+
dataObject={props.cache.mainNavCache}
|
|
51
|
+
website={website}
|
|
52
|
+
subNav={props.cache.subNavCache}
|
|
53
|
+
/>
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
56
|
// Setting 'socialIconVariant' as 'light' as default to make the social icons and search icon black
|
|
@@ -110,7 +110,7 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
110
110
|
|
|
111
111
|
React.useEffect(function () {
|
|
112
112
|
// Check for desktop or mobile device
|
|
113
|
-
if (window && window.innerWidth <
|
|
113
|
+
if (window && window.innerWidth < 1200) setIsDesktop(false);
|
|
114
114
|
|
|
115
115
|
// Hiding light-nav with logo on mobile devices
|
|
116
116
|
if (window && window.innerWidth < 1200 && topNavRef) topNavRef.current.style.display = 'none';
|
|
@@ -141,11 +141,11 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
141
141
|
if (resolution === 0) {
|
|
142
142
|
setResolution(window.innerWidth);
|
|
143
143
|
} else {
|
|
144
|
-
if (window.innerWidth <
|
|
144
|
+
if (window.innerWidth < 768 && resolution >= 768 && isDesktop) {
|
|
145
145
|
console.log('Detected Mobile Resolution');
|
|
146
146
|
window.location.reload();
|
|
147
147
|
// Updating the condition to reload the page on resize in desktop view
|
|
148
|
-
} else if (window.innerWidth >=
|
|
148
|
+
} else if (window.innerWidth >= 768 && !isDesktop) {
|
|
149
149
|
console.log('Detected Tablet/Desktop Resolution');
|
|
150
150
|
window.location.reload();
|
|
151
151
|
}
|
|
@@ -438,12 +438,7 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
438
438
|
if (ddRow.url && ddRow.name) {
|
|
439
439
|
return ddRow.url && ddRow.name ? React__default['default'].createElement(
|
|
440
440
|
'a',
|
|
441
|
-
{
|
|
442
|
-
key: subIndex,
|
|
443
|
-
needsegmentsupport: ddRow.needSegmentSupport ? 'true' : '',
|
|
444
|
-
href: ddRow.url,
|
|
445
|
-
target: ddRow.blank ? '_blank' : '_self',
|
|
446
|
-
className: 'dropdown-item' },
|
|
441
|
+
{ key: subIndex, needsegmentsupport: ddRow.needSegmentSupport ? 'true' : '', href: ddRow.url, target: ddRow.blank ? '_blank' : '_self', className: 'dropdown-item' },
|
|
447
442
|
ddRow.name
|
|
448
443
|
) : null;
|
|
449
444
|
} else return null;
|
|
@@ -463,12 +458,7 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
463
458
|
if (ddRow.url && ddRow.name) {
|
|
464
459
|
return ddRow.url && ddRow.name ? React__default['default'].createElement(
|
|
465
460
|
'a',
|
|
466
|
-
{
|
|
467
|
-
key: subIndex,
|
|
468
|
-
needsegmentsupport: ddRow.needSegmentSupport ? 'true' : '',
|
|
469
|
-
href: ddRow.url,
|
|
470
|
-
target: ddRow.blank ? '_blank' : '_self',
|
|
471
|
-
className: 'dropdown-item' },
|
|
461
|
+
{ key: subIndex, needsegmentsupport: ddRow.needSegmentSupport ? 'true' : '', href: ddRow.url, target: ddRow.blank ? '_blank' : '_self', className: 'dropdown-item' },
|
|
472
462
|
ddRow.name
|
|
473
463
|
) : null;
|
|
474
464
|
} else return null;
|
|
@@ -516,12 +506,7 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
516
506
|
} else {
|
|
517
507
|
return ddRow.url && ddRow.name ? React__default['default'].createElement(
|
|
518
508
|
'a',
|
|
519
|
-
{
|
|
520
|
-
key: subIndex,
|
|
521
|
-
needsegmentsupport: ddRow.needSegmentSupport ? 'true' : '',
|
|
522
|
-
href: ddRow.url,
|
|
523
|
-
target: ddRow.blank ? '_blank' : '_self',
|
|
524
|
-
className: 'dropdown-item' },
|
|
509
|
+
{ key: subIndex, needsegmentsupport: ddRow.needSegmentSupport ? 'true' : '', href: ddRow.url, target: ddRow.blank ? '_blank' : '_self', className: 'dropdown-item' },
|
|
525
510
|
ddRow.name
|
|
526
511
|
) : null;
|
|
527
512
|
}
|
|
@@ -539,12 +524,7 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
539
524
|
} else {
|
|
540
525
|
return ddRow.url && ddRow.name ? React__default['default'].createElement(
|
|
541
526
|
'a',
|
|
542
|
-
{
|
|
543
|
-
key: subIndex,
|
|
544
|
-
needsegmentsupport: ddRow.needSegmentSupport ? 'true' : '',
|
|
545
|
-
href: ddRow.url,
|
|
546
|
-
target: ddRow.blank ? '_blank' : '_self',
|
|
547
|
-
className: 'dropdown-item' },
|
|
527
|
+
{ key: subIndex, needsegmentsupport: ddRow.needSegmentSupport ? 'true' : '', href: ddRow.url, target: ddRow.blank ? '_blank' : '_self', className: 'dropdown-item' },
|
|
548
528
|
ddRow.name
|
|
549
529
|
) : null;
|
|
550
530
|
}
|
|
@@ -587,7 +567,7 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
587
567
|
React__default['default'].createElement(
|
|
588
568
|
'style',
|
|
589
569
|
{ jsx: 'true' },
|
|
590
|
-
'\n .sticky-home {\n position: relative;\n top: -3px;\n left: -6px;\n cursor: pointer;\n }\n .nav-item svg {\n margin-bottom: 2px;\n }\n #nav-login,\n #nav-logout,\n #nav-register {\n padding: 0.5rem;\n cursor: pointer;\n }\n #nav-mobile-login,\n #nav-mobile-logout,\n #nav-mobile-register {\n display: none;\n }\n #nav-mobile-logout,\n #nav-mobile-login {\n position: absolute;\n right: 1rem;\n }\n #nav-mobile-register {\n position: absolute;\n left: 1rem;\n }\n @media screen and (max-width: 767px) {\n .logo {\n width: 100%;\n padding-left: 10px;\n padding-right: 10px;\n }\n }\n @media screen and (max-width: 1199px) {\n .mobile-nav .nav-toggle {\n width: 100%;\n }\n .nav-open {\n position: relative;\n }\n .mobile-nav .nav-toggle {\n width: 100%;\n }\n .android-nav {\n max-height: 80vh;\n }\n .ios-nav {\n max-height: none;\n }\n .mobile-nav .nav-toggle .navbar-toggler {\n float: left;\n height: 45px;\n }\n .mobile-nav .form-inline .mobile-search {\n width: auto;\n }\n .sticky-home {\n display: none;\n }\n // .dropdown-menu {\n // max-height: 315px;\n // overflow: auto;\n // }\n ::-webkit-scrollbar {\n width: 10px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(214, 214, 214, 0.8);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n .navbar-expand-xl .show#basic-navbar-sub {\n display: block;\n }\n .navbar .mobile-nav .navbar-collapse.show {\n padding-bottom: 10px;\n border-bottom: 0.5px solid white;\n }\n .navbar .mobile-nav .navbar-collapse .form-inline {\n display: none;\n }\n .navbar .mobile-nav .navbar-collapse {\n margin-top: 15px;\n }\n .navbar .mobile-nav .navbar-collapse:last-child {\n border-bottom: none;\n margin-bottom: 0px;\n padding-bottom: 0px;\n margin-top: 0px;\n padding-top: 10px;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer ul {\n list-style-type: none;\n padding: inherit;\n margin-bottom: 0rem;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer .nav-link {\n text-transform: capitalize !important;\n font-weight: 300;\n }\n .navbar .mobile-nav .dropdown-item:focus {\n background-color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: white;\n white-space: inherit !important;\n margin-bottom: 5px;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: inherit;\n border: none;\n }\n // .navbar .mobile-nav .dropdown-menu.show {\n // max-height: 100px;\n // }\n }\n @media screen and (min-width: 1200px) {\n #navbar-ham {\n overflow: visible !important;\n }\n #basic-navbar-sub {\n display: none !important;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: white;\n border: 1 px solid #708090;\n }\n .navbar.bg-primary {\n z-index: 3000000 !important;\n }\n }\n @media screen and (max-width: 1199px) {\n #nav-mobile-login,\n #nav-mobile-logout,\n #nav-mobile-register {\n display: block;\n }\n .navbar-top {\n flex-direction: row;\n justify-content: space-around !important;\n align-items: center;\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n width: 100%;\n }\n }\n @media screen and (max-width: 1199px) {\n .navbar .mobile-nav .dropdown-menu.show {\n overflow: hidden;\n overflow-y: scroll;\n }\n .dropdown-menu.show > .nav-item
|
|
570
|
+
'\n .sticky-home {\n position: relative;\n top: -3px;\n left: -6px;\n cursor: pointer;\n }\n .nav-item svg {\n margin-bottom: 2px;\n }\n #nav-login,\n #nav-logout,\n #nav-register {\n padding: 0.5rem;\n cursor: pointer;\n }\n #nav-mobile-login,\n #nav-mobile-logout,\n #nav-mobile-register {\n display: none;\n }\n #nav-mobile-logout,\n #nav-mobile-login {\n position: absolute;\n right: 1rem;\n }\n #nav-mobile-register {\n position: absolute;\n left: 1rem;\n }\n @media screen and (max-width: 767px) {\n .logo {\n width: 100%;\n padding-left: 10px;\n padding-right: 10px;\n }\n }\n @media screen and (max-width: 1199px) {\n .mobile-nav .nav-toggle {\n width: 100%;\n }\n .nav-open {\n position: relative;\n }\n .mobile-nav .nav-toggle {\n width: 100%;\n }\n .android-nav {\n max-height: 80vh;\n }\n .ios-nav {\n max-height: none;\n }\n .mobile-nav .nav-toggle .navbar-toggler {\n float: left;\n height: 45px;\n }\n .mobile-nav .form-inline .mobile-search {\n width: auto;\n }\n .sticky-home {\n display: none;\n }\n // .dropdown-menu {\n // max-height: 315px;\n // overflow: auto;\n // }\n ::-webkit-scrollbar {\n width: 10px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(214, 214, 214, 0.8);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n .navbar-expand-xl .show#basic-navbar-sub {\n display: block;\n }\n .navbar .mobile-nav .navbar-collapse.show {\n padding-bottom: 10px;\n border-bottom: 0.5px solid white;\n }\n .navbar .mobile-nav .navbar-collapse .form-inline {\n display: none;\n }\n .navbar .mobile-nav .navbar-collapse {\n margin-top: 15px;\n }\n .navbar .mobile-nav .navbar-collapse:last-child {\n border-bottom: none;\n margin-bottom: 0px;\n padding-bottom: 0px;\n margin-top: 0px;\n padding-top: 10px;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer ul {\n list-style-type: none;\n padding: inherit;\n margin-bottom: 0rem;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer .nav-link {\n text-transform: capitalize !important;\n font-weight: 300;\n }\n .navbar .mobile-nav .dropdown-item:focus {\n background-color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: white;\n white-space: inherit !important;\n margin-bottom: 5px;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: inherit;\n border: none;\n }\n // .navbar .mobile-nav .dropdown-menu.show {\n // max-height: 100px;\n // }\n }\n @media screen and (min-width: 1200px) {\n #navbar-ham {\n overflow: visible !important;\n }\n #basic-navbar-sub {\n display: none !important;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: white;\n border: 1 px solid #708090;\n }\n .navbar.bg-primary {\n z-index: 3000000 !important;\n }\n }\n @media screen and (max-width: 1199px) {\n #nav-mobile-login,\n #nav-mobile-logout,\n #nav-mobile-register {\n display: block;\n }\n .navbar-top {\n flex-direction: row;\n justify-content: space-around !important;\n align-items: center;\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n width: 100%;\n }\n }\n @media screen and (max-width: 1199px) {\n .navbar .mobile-nav .dropdown-menu.show {\n overflow: hidden;\n overflow-y: scroll;\n }\n .dropdown-menu.show > .nav-item{\n padding: .5rem;\n }\n }\n '
|
|
591
571
|
)
|
|
592
572
|
);
|
|
593
573
|
};
|
package/dist/cjs/NavNative.js
CHANGED
|
@@ -41,15 +41,15 @@ var FormControl__default = /*#__PURE__*/_interopDefaultLegacy(FormControl);
|
|
|
41
41
|
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
42
42
|
|
|
43
43
|
var NavNative = function NavNative(props) {
|
|
44
|
-
/*
|
|
45
|
-
Example Nav with acceptable props
|
|
46
|
-
<MagazineNav
|
|
47
|
-
showLogin
|
|
48
|
-
logo={props.settings.logo}
|
|
49
|
-
dataObject={props.cache.mainNavCache}
|
|
50
|
-
website={website}
|
|
51
|
-
subNav={props.cache.subNavCache}
|
|
52
|
-
/>
|
|
44
|
+
/*
|
|
45
|
+
Example Nav with acceptable props
|
|
46
|
+
<MagazineNav
|
|
47
|
+
showLogin
|
|
48
|
+
logo={props.settings.logo}
|
|
49
|
+
dataObject={props.cache.mainNavCache}
|
|
50
|
+
website={website}
|
|
51
|
+
subNav={props.cache.subNavCache}
|
|
52
|
+
/>
|
|
53
53
|
*/
|
|
54
54
|
// Setting 'socialIconVariant' as 'dark' as default to make the social icons and search icon black
|
|
55
55
|
var logo = props.logo,
|
|
@@ -91,7 +91,7 @@ var NavNative = function NavNative(props) {
|
|
|
91
91
|
|
|
92
92
|
React.useEffect(function () {
|
|
93
93
|
// Check for desktop or mobile device
|
|
94
|
-
if (window && window.innerWidth <
|
|
94
|
+
if (window && window.innerWidth < 1200) setIsDesktop(false);
|
|
95
95
|
// Initial screenwidth on refresh or on load
|
|
96
96
|
setScreenWidth(parseInt(window.innerWidth));
|
|
97
97
|
// Initial User agent setup on refresh or on load
|
|
@@ -122,11 +122,11 @@ var NavNative = function NavNative(props) {
|
|
|
122
122
|
if (resolution === 0) {
|
|
123
123
|
setResolution(window.innerWidth);
|
|
124
124
|
} else {
|
|
125
|
-
if (window.innerWidth <
|
|
125
|
+
if (window.innerWidth < 768 && resolution >= 768 && isDesktop) {
|
|
126
126
|
console.log('Detected Mobile Resolution');
|
|
127
127
|
window.location.reload();
|
|
128
128
|
// Updating the condition to reload the page on resize in desktop view
|
|
129
|
-
} else if (window.innerWidth >=
|
|
129
|
+
} else if (window.innerWidth >= 768 && !isDesktop) {
|
|
130
130
|
console.log('Detected Tablet/Desktop Resolution');
|
|
131
131
|
window.location.reload();
|
|
132
132
|
}
|
|
@@ -380,39 +380,39 @@ module.exports = { "default": set, __esModule: true };
|
|
|
380
380
|
|
|
381
381
|
var _Set = _commonjsHelpers.unwrapExports(set$1);
|
|
382
382
|
|
|
383
|
-
/* usage & query
|
|
384
|
-
const Publication = (props) => {
|
|
385
|
-
const { cache, pub, year } = props
|
|
386
|
-
|
|
387
|
-
const targeting = {
|
|
388
|
-
content_placement: [`/journals/${pub.identifier.current}`],
|
|
389
|
-
document_url: [`/journals/${pub.identifier.current}`],
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
return (
|
|
393
|
-
<Shell title={pub.name} cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3'>
|
|
394
|
-
<PublicationLanding publication={pub} year={year} href={'journals'} />
|
|
395
|
-
</Shell>
|
|
396
|
-
)
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
Publication.getInitialProps = async (ctx) => {
|
|
400
|
-
const { query } = ctx
|
|
401
|
-
const {
|
|
402
|
-
query: { year },
|
|
403
|
-
} = ctx
|
|
404
|
-
const pub = await client.fetch(getQuery('publication'), query)
|
|
405
|
-
const builder = imageUrlBuilder(client)
|
|
406
|
-
const urlFor = (source) => {
|
|
407
|
-
return builder.image(source)
|
|
408
|
-
}
|
|
409
|
-
pub.issues.map((issue) => {
|
|
410
|
-
issue.thumbnail = urlFor(issue.thumbnail).url()
|
|
411
|
-
})
|
|
412
|
-
return { pub, year }
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
export default Publication
|
|
383
|
+
/* usage & query
|
|
384
|
+
const Publication = (props) => {
|
|
385
|
+
const { cache, pub, year } = props
|
|
386
|
+
|
|
387
|
+
const targeting = {
|
|
388
|
+
content_placement: [`/journals/${pub.identifier.current}`],
|
|
389
|
+
document_url: [`/journals/${pub.identifier.current}`],
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
return (
|
|
393
|
+
<Shell title={pub.name} cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3'>
|
|
394
|
+
<PublicationLanding publication={pub} year={year} href={'journals'} />
|
|
395
|
+
</Shell>
|
|
396
|
+
)
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
Publication.getInitialProps = async (ctx) => {
|
|
400
|
+
const { query } = ctx
|
|
401
|
+
const {
|
|
402
|
+
query: { year },
|
|
403
|
+
} = ctx
|
|
404
|
+
const pub = await client.fetch(getQuery('publication'), query)
|
|
405
|
+
const builder = imageUrlBuilder(client)
|
|
406
|
+
const urlFor = (source) => {
|
|
407
|
+
return builder.image(source)
|
|
408
|
+
}
|
|
409
|
+
pub.issues.map((issue) => {
|
|
410
|
+
issue.thumbnail = urlFor(issue.thumbnail).url()
|
|
411
|
+
})
|
|
412
|
+
return { pub, year }
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export default Publication
|
|
416
416
|
*/
|
|
417
417
|
|
|
418
418
|
var generateContentPlacements = function generateContentPlacements(issues) {
|
|
@@ -13,34 +13,34 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
13
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
15
|
|
|
16
|
-
/*
|
|
17
|
-
Sample query
|
|
18
|
-
let references = ''
|
|
19
|
-
if(article.taxonomyMapping.length > 0){
|
|
20
|
-
article.taxonomyMapping.forEach((ref, index) => {
|
|
21
|
-
references = references + `references('${ref._ref}') `
|
|
22
|
-
if(index+1 !== article.taxonomyMapping.length){
|
|
23
|
-
references = references + ` && `
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
29
|
-
...,
|
|
30
|
-
title,
|
|
31
|
-
summary,
|
|
32
|
-
thumbnail,
|
|
33
|
-
url,
|
|
34
|
-
published,
|
|
35
|
-
authorMapping[]->,
|
|
36
|
-
contentCategory->
|
|
37
|
-
}`
|
|
38
|
-
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
39
|
-
|
|
40
|
-
Sample usage
|
|
41
|
-
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
42
|
-
|
|
43
|
-
|
|
16
|
+
/*
|
|
17
|
+
Sample query
|
|
18
|
+
let references = ''
|
|
19
|
+
if(article.taxonomyMapping.length > 0){
|
|
20
|
+
article.taxonomyMapping.forEach((ref, index) => {
|
|
21
|
+
references = references + `references('${ref._ref}') `
|
|
22
|
+
if(index+1 !== article.taxonomyMapping.length){
|
|
23
|
+
references = references + ` && `
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
29
|
+
...,
|
|
30
|
+
title,
|
|
31
|
+
summary,
|
|
32
|
+
thumbnail,
|
|
33
|
+
url,
|
|
34
|
+
published,
|
|
35
|
+
authorMapping[]->,
|
|
36
|
+
contentCategory->
|
|
37
|
+
}`
|
|
38
|
+
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
39
|
+
|
|
40
|
+
Sample usage
|
|
41
|
+
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
42
|
+
|
|
43
|
+
|
|
44
44
|
*/
|
|
45
45
|
var RelatedContent = function RelatedContent(props) {
|
|
46
46
|
var client = props.client,
|
|
@@ -22,16 +22,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
22
22
|
_ref$className = _ref.className,
|
|
23
23
|
className = _ref$className === undefined ? '' : _ref$className;
|
|
24
24
|
|
|
25
|
-
/*
|
|
26
|
-
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
27
|
-
example:
|
|
28
|
-
<RelatedTopicDropdown
|
|
29
|
-
page='/clinical'
|
|
30
|
-
exclude="clinical"
|
|
31
|
-
className='mb-3'
|
|
32
|
-
parentTaxonomy={props.parentTaxonomy}
|
|
33
|
-
subTaxonomies={props.subTaxonomies}
|
|
34
|
-
/>
|
|
25
|
+
/*
|
|
26
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
27
|
+
example:
|
|
28
|
+
<RelatedTopicDropdown
|
|
29
|
+
page='/clinical'
|
|
30
|
+
exclude="clinical"
|
|
31
|
+
className='mb-3'
|
|
32
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
33
|
+
subTaxonomies={props.subTaxonomies}
|
|
34
|
+
/>
|
|
35
35
|
*/
|
|
36
36
|
if (subTaxonomies.length === 0 && parentTaxonomy) {
|
|
37
37
|
if (parentTaxonomy.identifier == exclude) {
|
package/dist/cjs/SideFooter.js
CHANGED
|
@@ -40,8 +40,8 @@ var renderLink = function renderLink(row) {
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
var SideFooter = function SideFooter(props) {
|
|
43
|
-
/*
|
|
44
|
-
useage example: <SideFooter cache={props.cache} logo='https://mjh-web.s3.amazonaws.com/_media/an_mjhls_brand_logo.png' />
|
|
43
|
+
/*
|
|
44
|
+
useage example: <SideFooter cache={props.cache} logo='https://mjh-web.s3.amazonaws.com/_media/an_mjhls_brand_logo.png' />
|
|
45
45
|
*/
|
|
46
46
|
var _get = get.get_1(props, 'cache.siteSettingCache', {}),
|
|
47
47
|
socialLinks = _get.socialLinks,
|
|
@@ -20,7 +20,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
20
20
|
|
|
21
21
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
22
|
|
|
23
|
-
var css = ".VideoSeriesCard-module_article__Hlc3e {\n width: 100%;\n margin: 0 0 1rem 0;\n}\n.VideoSeriesCard-module_article__Hlc3e a {\n display: flex;\n width: 100%;\n color: #000000;\n}\n.VideoSeriesCard-module_thumb__3hGyJ {\n width: 25%;\n}\n.VideoSeriesCard-module_thumb__3hGyJ img {\n width: 100%;\n height: auto;\n}\n.VideoSeriesCard-module_info__2_i1N {\n width: 75%;\n font-size: 1rem;\n}\n.VideoSeriesCard-module_info__2_i1N h2 {\n font-weight: bold;\n font-size: 1.25rem;\n margin: 0;\n}\n.VideoSeriesCard-module_published__1fI0q {\n color: #6d6d6d;\n margin: 0;\n}\n.VideoSeriesCard-module_summary__3hWJT {\n margin: 0.5rem 0 0 0;\n}\n.VideoSeriesCard-module_author__aU35o {\n margin: 0;\n}\n.VideoSeriesCard-module_author__aU35o span {\n color: #6d6d6d;\n}\n@media only screen and (max-width: 568px) {\n .VideoSeriesCard-module_article__Hlc3e {\n margin: 1rem 0;\n box-shadow: 2px 4px 8px rgba(0,0,0,.2);\n }\n .VideoSeriesCard-module_article__Hlc3e a {\n flex-direction: column;\n align-items: center;\n }\n .VideoSeriesCard-module_thumb__3hGyJ {\n overflow: hidden;\n width: 100%;\n margin-bottom: 1rem;\n }\n .VideoSeriesCard-module_thumb__3hGyJ img{\n border-radius: 10px 10px 0 0; \n }\n .VideoSeriesCard-module_thumb__3hGyJ figure {\n margin: 0;\n }\n .VideoSeriesCard-module_info__2_i1N {\n width: 90%;\n padding: 1rem !important;\n }\n .VideoSeriesCard-module_info__2_i1N h2 {\n font-size: 1rem;\n }\n}\n";
|
|
23
|
+
var css = ".VideoSeriesCard-module_article__Hlc3e {\r\n width: 100%;\r\n margin: 0 0 1rem 0;\r\n}\r\n.VideoSeriesCard-module_article__Hlc3e a {\r\n display: flex;\r\n width: 100%;\r\n color: #000000;\r\n}\r\n.VideoSeriesCard-module_thumb__3hGyJ {\r\n width: 25%;\r\n}\r\n.VideoSeriesCard-module_thumb__3hGyJ img {\r\n width: 100%;\r\n height: auto;\r\n}\r\n.VideoSeriesCard-module_info__2_i1N {\r\n width: 75%;\r\n font-size: 1rem;\r\n}\r\n.VideoSeriesCard-module_info__2_i1N h2 {\r\n font-weight: bold;\r\n font-size: 1.25rem;\r\n margin: 0;\r\n}\r\n.VideoSeriesCard-module_published__1fI0q {\r\n color: #6d6d6d;\r\n margin: 0;\r\n}\r\n.VideoSeriesCard-module_summary__3hWJT {\r\n margin: 0.5rem 0 0 0;\r\n}\r\n.VideoSeriesCard-module_author__aU35o {\r\n margin: 0;\r\n}\r\n.VideoSeriesCard-module_author__aU35o span {\r\n color: #6d6d6d;\r\n}\r\n@media only screen and (max-width: 568px) {\r\n .VideoSeriesCard-module_article__Hlc3e {\r\n margin: 1rem 0;\r\n box-shadow: 2px 4px 8px rgba(0,0,0,.2);\r\n }\r\n .VideoSeriesCard-module_article__Hlc3e a {\r\n flex-direction: column;\r\n align-items: center;\r\n }\r\n .VideoSeriesCard-module_thumb__3hGyJ {\r\n overflow: hidden;\r\n width: 100%;\r\n margin-bottom: 1rem;\r\n }\r\n .VideoSeriesCard-module_thumb__3hGyJ img{\r\n border-radius: 10px 10px 0 0; \r\n }\r\n .VideoSeriesCard-module_thumb__3hGyJ figure {\r\n margin: 0;\r\n }\r\n .VideoSeriesCard-module_info__2_i1N {\r\n width: 90%;\r\n padding: 1rem !important;\r\n }\r\n .VideoSeriesCard-module_info__2_i1N h2 {\r\n font-size: 1rem;\r\n }\r\n}\r\n";
|
|
24
24
|
var styles = { "article": "VideoSeriesCard-module_article__Hlc3e", "thumb": "VideoSeriesCard-module_thumb__3hGyJ", "info": "VideoSeriesCard-module_info__2_i1N", "published": "VideoSeriesCard-module_published__1fI0q", "summary": "VideoSeriesCard-module_summary__3hWJT", "author": "VideoSeriesCard-module_author__aU35o" };
|
|
25
25
|
styleInject_es.styleInject(css);
|
|
26
26
|
|
package/dist/cjs/View.js
CHANGED
|
@@ -18,7 +18,7 @@ var Button = require('react-bootstrap/Button');
|
|
|
18
18
|
var getSerializers = require('./index-9e0ebc87.js');
|
|
19
19
|
var SocialShare = require('./SocialShare.js');
|
|
20
20
|
var AdSlot = require('./AdSlot.js');
|
|
21
|
-
var getTargeting = require('./getTargeting-
|
|
21
|
+
var getTargeting = require('./getTargeting-497b581d.js');
|
|
22
22
|
var getKeywords = require('./getKeywords.js');
|
|
23
23
|
var urlFor = require('./urlFor.js');
|
|
24
24
|
var _typeof = require('./typeof-97065d40.js');
|
|
@@ -333,7 +333,7 @@ var ISI = function ISI(props) {
|
|
|
333
333
|
);
|
|
334
334
|
};
|
|
335
335
|
|
|
336
|
-
var css = ".RelatedArticles-module_mediaContainer__10h9k {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n margin: 0 -1rem;\n}\n.RelatedArticles-module_mediaCard__3wQbn {\n margin: 0 1rem 1rem;\n width: calc(33% - 1rem);\n display: column;\n flex-direction: row;\n margin-bottom: 0.75rem;\n padding-bottom: 0.75rem;\n border-bottom: none;\n}\n.RelatedArticles-module_mediaCard__3wQbn:last-child {\n border-bottom: none;\n}\n.RelatedArticles-module_cardTitle__3P-Ib {\n font-weight: bold;\n color: #252525;\n margin-bottom: 0.25rem;\n font-size: 15px;\n}\n.RelatedArticles-module_authorListing__1EFg4 span.RelatedArticles-module_text-muted__3b0zX {\n color: #000;\n font-weight: bold;\n}\n.RelatedArticles-module_cardDate__1wOR5 {\n color: var(--dark);\n display: block;\n background: #fff !important;\n margin-bottom: 0;\n}\n.RelatedArticles-module_imgWrapper__5Jx_4 {\n display: block;\n text-align: center;\n margin-bottom: 0.5rem;\n}\n.RelatedArticles-module_imgWrapper__5Jx_4 img {\n height: 135px;\n width: 100%;\n object-fit: cover;\n object-position: center;\n}\n@media screen and (max-width: 1064px) {\n}\n@media screen and (max-width: 968px) {\n .RelatedArticles-module_mediaContainer__10h9k {\n flex-wrap: wrap;\n }\n .RelatedArticles-module_imgWrapper__5Jx_4 {\n display: none;\n }\n .RelatedArticles-module_mediaCard__3wQbn {\n width: 100%;\n margin-bottom: 0.5rem;\n padding: 0;\n }\n .RelatedArticles-module_cardTitle__3P-Ib {\n font-size: 0.75rem;\n margin-bottom: 0;\n }\n}\n";
|
|
336
|
+
var css = ".RelatedArticles-module_mediaContainer__10h9k {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: nowrap;\r\n margin: 0 -1rem;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn {\r\n margin: 0 1rem 1rem;\r\n width: calc(33% - 1rem);\r\n display: column;\r\n flex-direction: row;\r\n margin-bottom: 0.75rem;\r\n padding-bottom: 0.75rem;\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn:last-child {\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_cardTitle__3P-Ib {\r\n font-weight: bold;\r\n color: #252525;\r\n margin-bottom: 0.25rem;\r\n font-size: 15px;\r\n}\r\n.RelatedArticles-module_authorListing__1EFg4 span.RelatedArticles-module_text-muted__3b0zX {\r\n color: #000;\r\n font-weight: bold;\r\n}\r\n.RelatedArticles-module_cardDate__1wOR5 {\r\n color: var(--dark);\r\n display: block;\r\n background: #fff !important;\r\n margin-bottom: 0;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: block;\r\n text-align: center;\r\n margin-bottom: 0.5rem;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 img {\r\n height: 135px;\r\n width: 100%;\r\n object-fit: cover;\r\n object-position: center;\r\n}\r\n@media screen and (max-width: 1064px) {\r\n}\r\n@media screen and (max-width: 968px) {\r\n .RelatedArticles-module_mediaContainer__10h9k {\r\n flex-wrap: wrap;\r\n }\r\n .RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: none;\r\n }\r\n .RelatedArticles-module_mediaCard__3wQbn {\r\n width: 100%;\r\n margin-bottom: 0.5rem;\r\n padding: 0;\r\n }\r\n .RelatedArticles-module_cardTitle__3P-Ib {\r\n font-size: 0.75rem;\r\n margin-bottom: 0;\r\n }\r\n}\r\n";
|
|
337
337
|
var styles = { "mediaContainer": "RelatedArticles-module_mediaContainer__10h9k", "mediaCard": "RelatedArticles-module_mediaCard__3wQbn", "cardTitle": "RelatedArticles-module_cardTitle__3P-Ib", "authorListing": "RelatedArticles-module_authorListing__1EFg4", "text-muted": "RelatedArticles-module_text-muted__3b0zX", "cardDate": "RelatedArticles-module_cardDate__1wOR5", "imgWrapper": "RelatedArticles-module_imgWrapper__5Jx_4" };
|
|
338
338
|
styleInject_es.styleInject(css);
|
|
339
339
|
|
package/dist/cjs/YoutubeGroup.js
CHANGED
|
@@ -23,10 +23,10 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
23
23
|
|
|
24
24
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
25
25
|
|
|
26
|
-
/*
|
|
27
|
-
GROQ query -
|
|
28
|
-
accepts an array of title, URL
|
|
29
|
-
`https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
|
|
26
|
+
/*
|
|
27
|
+
GROQ query -
|
|
28
|
+
accepts an array of title, URL
|
|
29
|
+
`https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
32
|
var YoutubeGroup = function YoutubeGroup(props) {
|
|
@@ -4,18 +4,18 @@ var _extends = require('./extends-1e24fc8d.js');
|
|
|
4
4
|
var toConsumableArray = require('./toConsumableArray-cf0865fc.js');
|
|
5
5
|
|
|
6
6
|
var getContentPlacementUrl = function getContentPlacementUrl(cp) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
var cp_url = '';
|
|
8
|
+
if (cp.ancestor && typeof cp.ancestor == 'string') {
|
|
9
|
+
cp_url += (cp_url === '' ? '' : '/') + cp.ancestor;
|
|
10
|
+
}
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
if (!cp.ancestor && cp.parent && typeof cp.parent == 'string') {
|
|
13
|
+
cp_url += (cp_url === '' ? '' : '/') + cp.parent;
|
|
14
|
+
}
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
cp_url += (cp_url === '' ? '' : '/') + cp.path;
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
return cp_url;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
var getTargeting = function getTargeting(props) {
|
package/dist/cjs/getTargeting.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./extends-1e24fc8d.js');
|
|
4
4
|
require('./toConsumableArray-cf0865fc.js');
|
|
5
|
-
var getTargeting = require('./getTargeting-
|
|
5
|
+
var getTargeting = require('./getTargeting-497b581d.js');
|
|
6
6
|
require('./_commonjsHelpers-06173234.js');
|
|
7
7
|
require('./_to-object-821a2927.js');
|
|
8
8
|
require('./_object-pie-68c5bcbc.js');
|