@mjhls/mjh-framework 1.0.721-ad-test → 1.0.722
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 +168 -168
- package/dist/cjs/ADFloatingFooter.js +3 -3
- package/dist/cjs/AdSlot.js +1 -1
- package/dist/cjs/ArticleProgramLandingPage.js +1 -1
- package/dist/cjs/ArticleSeriesLandingPage.js +2 -2
- package/dist/cjs/ConferenceArticleCard.js +15 -15
- package/dist/cjs/DeckContent.js +9 -9
- package/dist/cjs/EventsDeck.js +18 -18
- package/dist/cjs/ExternalResources.js +2 -2
- package/dist/cjs/GridContent.js +2 -2
- package/dist/cjs/HamMagazine.js +9 -9
- package/dist/cjs/HorizontalArticleListing.js +1 -1
- package/dist/cjs/IssueLanding.js +31 -31
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/MasterDeck.js +10 -10
- package/dist/cjs/NavMagazine.js +10 -10
- package/dist/cjs/NavNative.js +9 -9
- package/dist/cjs/PartnerDetailListing.js +3 -3
- package/dist/cjs/PublicationLanding.js +33 -33
- package/dist/cjs/QueueDeckExpanded.js +2 -2
- package/dist/cjs/RelatedContent.js +28 -28
- package/dist/cjs/RelatedTopicsDropdown.js +10 -10
- package/dist/cjs/SideFooter.js +2 -2
- package/dist/cjs/TaxonomyDescription.js +1 -1
- package/dist/cjs/VideoProgramLandingPage.js +1 -1
- package/dist/cjs/VideoSeriesCard.js +1 -1
- package/dist/cjs/VideoSeriesLandingPage.js +2 -2
- package/dist/cjs/View.js +3 -3
- package/dist/cjs/YoutubeGroup.js +14 -12
- package/dist/cjs/getSerializers.js +1 -1
- 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 +5 -5
- package/dist/esm/ADFloatingFooter.js +3 -3
- package/dist/esm/AdSlot.js +1 -1
- package/dist/esm/ArticleProgramLandingPage.js +1 -1
- package/dist/esm/ArticleSeriesLandingPage.js +2 -2
- package/dist/esm/ConferenceArticleCard.js +15 -15
- package/dist/esm/DeckContent.js +9 -9
- package/dist/esm/EventsDeck.js +18 -18
- package/dist/esm/ExternalResources.js +2 -2
- package/dist/esm/GridContent.js +2 -2
- package/dist/esm/HamMagazine.js +9 -9
- package/dist/esm/HorizontalArticleListing.js +1 -1
- package/dist/esm/IssueLanding.js +31 -31
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/MasterDeck.js +10 -10
- package/dist/esm/NavMagazine.js +10 -10
- package/dist/esm/NavNative.js +9 -9
- package/dist/esm/PartnerDetailListing.js +3 -3
- package/dist/esm/PublicationLanding.js +33 -33
- package/dist/esm/QueueDeckExpanded.js +2 -2
- package/dist/esm/RelatedContent.js +28 -28
- package/dist/esm/RelatedTopicsDropdown.js +10 -10
- package/dist/esm/SideFooter.js +2 -2
- package/dist/esm/TaxonomyDescription.js +1 -1
- package/dist/esm/VideoProgramLandingPage.js +1 -1
- package/dist/esm/VideoSeriesCard.js +1 -1
- package/dist/esm/VideoSeriesLandingPage.js +2 -2
- package/dist/esm/View.js +3 -3
- package/dist/esm/YoutubeGroup.js +14 -12
- package/dist/esm/getSerializers.js +1 -1
- 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 +5 -5
- package/package.json +105 -105
- /package/dist/cjs/{ADInfeed-922ce08c.js → ADInfeed-2c7a6dd8.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-4fee6863.js → ADlgInfeed-fb101797.js} +0 -0
- /package/dist/cjs/{index-f05ea5ad.js → index-3ce0ae25.js} +0 -0
- /package/dist/esm/{ADInfeed-ed02c6ec.js → ADInfeed-3ee501b9.js} +0 -0
- /package/dist/esm/{ADlgInfeed-550d351e.js → ADlgInfeed-0bf06b17.js} +0 -0
- /package/dist/esm/{index-39873c27.js → index-f98ea5e2.js} +0 -0
package/dist/esm/IssueLanding.js
CHANGED
|
@@ -23,7 +23,7 @@ import 'next/router';
|
|
|
23
23
|
import './index-752d1dae.js';
|
|
24
24
|
import './main-1450d277.js';
|
|
25
25
|
import './entities-932b50cf.js';
|
|
26
|
-
import './ADInfeed-
|
|
26
|
+
import './ADInfeed-3ee501b9.js';
|
|
27
27
|
import './stringify-d4839bab.js';
|
|
28
28
|
import 'react-bootstrap/Card';
|
|
29
29
|
import './AdSlot.js';
|
|
@@ -36,40 +36,40 @@ import './_set-species-494ed292.js';
|
|
|
36
36
|
import './Segment.js';
|
|
37
37
|
import './AuthorComponent-c7ff069f.js';
|
|
38
38
|
import './lodash-ad27652f.js';
|
|
39
|
-
import './ADlgInfeed-
|
|
39
|
+
import './ADlgInfeed-0bf06b17.js';
|
|
40
40
|
import './getContentCategory-15dcc413.js';
|
|
41
41
|
import './timeDifferenceCalc.js';
|
|
42
42
|
import 'react-bootstrap/Breadcrumb';
|
|
43
43
|
|
|
44
|
-
/* usage
|
|
45
|
-
import Settings, { Ads } from '../../../../settings'
|
|
46
|
-
import { IssueLanding, getQuery } from '@mjhls/mjh-framework'
|
|
47
|
-
import client from '../../../../client'
|
|
48
|
-
import moment from 'moment'
|
|
49
|
-
import Shell from '../../../../components/2.0/Shell'
|
|
50
|
-
import { pageview } from '../../../../utilities/gtag'
|
|
51
|
-
|
|
52
|
-
const Issue = (props) => {
|
|
53
|
-
const { pubIssue, cache } = props
|
|
54
|
-
const targeting = {
|
|
55
|
-
content_placement: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
56
|
-
document_url: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
57
|
-
}
|
|
58
|
-
return (
|
|
59
|
-
<Shell cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3' title={pubIssue.issue.name}>
|
|
60
|
-
<IssueLanding pubIssue={pubIssue} client={client} settings={Settings} pageview={pageview} rightItems={Ads.getMobileAds(targeting)} />
|
|
61
|
-
</Shell>
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
Issue.getInitialProps = async (ctx) => {
|
|
66
|
-
const { query } = ctx
|
|
67
|
-
const pubIssue = await client.fetch(getQuery('issue'), { ...query, currentDate: moment().utc().format() }
|
|
68
|
-
)
|
|
69
|
-
return { pubIssue }
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export default Issue
|
|
44
|
+
/* usage
|
|
45
|
+
import Settings, { Ads } from '../../../../settings'
|
|
46
|
+
import { IssueLanding, getQuery } from '@mjhls/mjh-framework'
|
|
47
|
+
import client from '../../../../client'
|
|
48
|
+
import moment from 'moment'
|
|
49
|
+
import Shell from '../../../../components/2.0/Shell'
|
|
50
|
+
import { pageview } from '../../../../utilities/gtag'
|
|
51
|
+
|
|
52
|
+
const Issue = (props) => {
|
|
53
|
+
const { pubIssue, cache } = props
|
|
54
|
+
const targeting = {
|
|
55
|
+
content_placement: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
56
|
+
document_url: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
57
|
+
}
|
|
58
|
+
return (
|
|
59
|
+
<Shell cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3' title={pubIssue.issue.name}>
|
|
60
|
+
<IssueLanding pubIssue={pubIssue} client={client} settings={Settings} pageview={pageview} rightItems={Ads.getMobileAds(targeting)} />
|
|
61
|
+
</Shell>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
Issue.getInitialProps = async (ctx) => {
|
|
66
|
+
const { query } = ctx
|
|
67
|
+
const pubIssue = await client.fetch(getQuery('issue'), { ...query, currentDate: moment().utc().format() }
|
|
68
|
+
)
|
|
69
|
+
return { pubIssue }
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export default Issue
|
|
73
73
|
*/
|
|
74
74
|
|
|
75
75
|
var IssueLanding = function IssueLanding(props) {
|
package/dist/esm/KMTracker.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
var KMTracker = function KMTracker(props) {
|
|
2
|
-
|
|
2
|
+
var id = props.id;
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
if (document && id) {
|
|
5
5
|
(function () {
|
|
6
|
-
|
|
6
|
+
var ecnJquery = document.createElement('script');
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
ecnJquery.type = 'text/javascript';
|
|
9
|
+
ecnJquery.async = true;
|
|
10
|
+
ecnJquery.src = 'https://apidt.ecn5.com/ECN_jQuery.min.js';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
var ecnScript = document.createElement('script');
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
ecnScript.type = 'text/javascript';
|
|
15
|
+
ecnScript.async = true;
|
|
16
|
+
ecnScript.id = 'km-tracker';
|
|
17
|
+
ecnScript.src = 'https://apidt.ecn5.com/ECN_tracker_Secure.js?TrackerKey=' + id;
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
document.head.appendChild(ecnJquery);
|
|
20
|
+
document.head.appendChild(ecnScript);
|
|
21
|
+
})();
|
|
22
|
+
}
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export default KMTracker;
|
package/dist/esm/MasterDeck.js
CHANGED
|
@@ -15,8 +15,8 @@ import { d as debounce_1 } from './debounce-1a993acf.js';
|
|
|
15
15
|
import { I as InfiniteScroll } from './index.es-c6222053.js';
|
|
16
16
|
import { V as VisibilitySensor } from './visibility-sensor-082c757b.js';
|
|
17
17
|
import './index-3f5c03b2.js';
|
|
18
|
-
import { A as ADlgInfeed } from './ADlgInfeed-
|
|
19
|
-
import { A as ADInfeed } from './ADInfeed-
|
|
18
|
+
import { A as ADlgInfeed } from './ADlgInfeed-0bf06b17.js';
|
|
19
|
+
import { A as ADInfeed } from './ADInfeed-3ee501b9.js';
|
|
20
20
|
import './main-1450d277.js';
|
|
21
21
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
22
22
|
import './es6.string.iterator-aa6068a3.js';
|
|
@@ -224,14 +224,14 @@ var MasterDeck = function (_React$Component) {
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
// please leave this for later debug purpose : Yong Jun.
|
|
227
|
-
/* console.log('page change reported', {
|
|
228
|
-
currentPage: currentPage,
|
|
229
|
-
pageNumber: pageNumber,
|
|
230
|
-
pathname: pathname,
|
|
231
|
-
path: path,
|
|
232
|
-
newPath: newPath,
|
|
233
|
-
firstPage: pageNumber === 1,
|
|
234
|
-
queryString: queryString
|
|
227
|
+
/* console.log('page change reported', {
|
|
228
|
+
currentPage: currentPage,
|
|
229
|
+
pageNumber: pageNumber,
|
|
230
|
+
pathname: pathname,
|
|
231
|
+
path: path,
|
|
232
|
+
newPath: newPath,
|
|
233
|
+
firstPage: pageNumber === 1,
|
|
234
|
+
queryString: queryString
|
|
235
235
|
}) */
|
|
236
236
|
|
|
237
237
|
if (pageview) {
|
package/dist/esm/NavMagazine.js
CHANGED
|
@@ -29,16 +29,16 @@ import 'react-bootstrap/FormControl';
|
|
|
29
29
|
import 'react-bootstrap/Button';
|
|
30
30
|
|
|
31
31
|
var NavMagazine = function NavMagazine(props) {
|
|
32
|
-
/*
|
|
33
|
-
Example Nav with acceptable props
|
|
34
|
-
<MagazineNav
|
|
35
|
-
showLogin
|
|
36
|
-
user={props.cache.user}
|
|
37
|
-
logo={props.settings.logo}
|
|
38
|
-
dataObject={props.cache.mainNavCache}
|
|
39
|
-
website={website}
|
|
40
|
-
subNav={props.cache.subNavCache}
|
|
41
|
-
/>
|
|
32
|
+
/*
|
|
33
|
+
Example Nav with acceptable props
|
|
34
|
+
<MagazineNav
|
|
35
|
+
showLogin
|
|
36
|
+
user={props.cache.user}
|
|
37
|
+
logo={props.settings.logo}
|
|
38
|
+
dataObject={props.cache.mainNavCache}
|
|
39
|
+
website={website}
|
|
40
|
+
subNav={props.cache.subNavCache}
|
|
41
|
+
/>
|
|
42
42
|
*/
|
|
43
43
|
|
|
44
44
|
// Setting 'socialIconVariant' as 'light' as default to make the social icons and search icon black
|
package/dist/esm/NavNative.js
CHANGED
|
@@ -26,15 +26,15 @@ import './_set-species-494ed292.js';
|
|
|
26
26
|
import './_iter-detect-48516cd3.js';
|
|
27
27
|
|
|
28
28
|
var NavNative = function NavNative(props) {
|
|
29
|
-
/*
|
|
30
|
-
Example Nav with acceptable props
|
|
31
|
-
<MagazineNav
|
|
32
|
-
showLogin
|
|
33
|
-
logo={props.settings.logo}
|
|
34
|
-
dataObject={props.cache.mainNavCache}
|
|
35
|
-
website={website}
|
|
36
|
-
subNav={props.cache.subNavCache}
|
|
37
|
-
/>
|
|
29
|
+
/*
|
|
30
|
+
Example Nav with acceptable props
|
|
31
|
+
<MagazineNav
|
|
32
|
+
showLogin
|
|
33
|
+
logo={props.settings.logo}
|
|
34
|
+
dataObject={props.cache.mainNavCache}
|
|
35
|
+
website={website}
|
|
36
|
+
subNav={props.cache.subNavCache}
|
|
37
|
+
/>
|
|
38
38
|
*/
|
|
39
39
|
// Setting 'socialIconVariant' as 'dark' as default to make the social icons and search icon black
|
|
40
40
|
var logo = props.logo,
|
|
@@ -10,7 +10,7 @@ import QueueDeckExpanded from './QueueDeckExpanded.js';
|
|
|
10
10
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
11
11
|
import Feature from './Feature.js';
|
|
12
12
|
import urlFor from './urlFor.js';
|
|
13
|
-
import { g as getSerializers } from './index-
|
|
13
|
+
import { g as getSerializers } from './index-f98ea5e2.js';
|
|
14
14
|
import { B as BlockContent } from './BlockContent-d8cd739c.js';
|
|
15
15
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
16
16
|
import './es6.string.iterator-aa6068a3.js';
|
|
@@ -32,7 +32,7 @@ import 'next/router';
|
|
|
32
32
|
import './index-752d1dae.js';
|
|
33
33
|
import './main-1450d277.js';
|
|
34
34
|
import './entities-932b50cf.js';
|
|
35
|
-
import './ADInfeed-
|
|
35
|
+
import './ADInfeed-3ee501b9.js';
|
|
36
36
|
import './stringify-d4839bab.js';
|
|
37
37
|
import 'react-bootstrap/Card';
|
|
38
38
|
import './AdSlot.js';
|
|
@@ -42,7 +42,7 @@ import './Beam.js';
|
|
|
42
42
|
import './Segment.js';
|
|
43
43
|
import './AuthorComponent-c7ff069f.js';
|
|
44
44
|
import './lodash-ad27652f.js';
|
|
45
|
-
import './ADlgInfeed-
|
|
45
|
+
import './ADlgInfeed-0bf06b17.js';
|
|
46
46
|
import './getContentCategory-15dcc413.js';
|
|
47
47
|
import './timeDifferenceCalc.js';
|
|
48
48
|
import 'react-bootstrap/Breadcrumb';
|
|
@@ -370,39 +370,39 @@ module.exports = { "default": set, __esModule: true };
|
|
|
370
370
|
|
|
371
371
|
var _Set = unwrapExports(set$1);
|
|
372
372
|
|
|
373
|
-
/* usage & query
|
|
374
|
-
const Publication = (props) => {
|
|
375
|
-
const { cache, pub, year } = props
|
|
376
|
-
|
|
377
|
-
const targeting = {
|
|
378
|
-
content_placement: [`/journals/${pub.identifier.current}`],
|
|
379
|
-
document_url: [`/journals/${pub.identifier.current}`],
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
return (
|
|
383
|
-
<Shell title={pub.name} cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3'>
|
|
384
|
-
<PublicationLanding publication={pub} year={year} href={'journals'} />
|
|
385
|
-
</Shell>
|
|
386
|
-
)
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
Publication.getInitialProps = async (ctx) => {
|
|
390
|
-
const { query } = ctx
|
|
391
|
-
const {
|
|
392
|
-
query: { year },
|
|
393
|
-
} = ctx
|
|
394
|
-
const pub = await client.fetch(getQuery('publication'), query)
|
|
395
|
-
const builder = imageUrlBuilder(client)
|
|
396
|
-
const urlFor = (source) => {
|
|
397
|
-
return builder.image(source)
|
|
398
|
-
}
|
|
399
|
-
pub.issues.map((issue) => {
|
|
400
|
-
issue.thumbnail = urlFor(issue.thumbnail).url()
|
|
401
|
-
})
|
|
402
|
-
return { pub, year }
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
export default Publication
|
|
373
|
+
/* usage & query
|
|
374
|
+
const Publication = (props) => {
|
|
375
|
+
const { cache, pub, year } = props
|
|
376
|
+
|
|
377
|
+
const targeting = {
|
|
378
|
+
content_placement: [`/journals/${pub.identifier.current}`],
|
|
379
|
+
document_url: [`/journals/${pub.identifier.current}`],
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
return (
|
|
383
|
+
<Shell title={pub.name} cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3'>
|
|
384
|
+
<PublicationLanding publication={pub} year={year} href={'journals'} />
|
|
385
|
+
</Shell>
|
|
386
|
+
)
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
Publication.getInitialProps = async (ctx) => {
|
|
390
|
+
const { query } = ctx
|
|
391
|
+
const {
|
|
392
|
+
query: { year },
|
|
393
|
+
} = ctx
|
|
394
|
+
const pub = await client.fetch(getQuery('publication'), query)
|
|
395
|
+
const builder = imageUrlBuilder(client)
|
|
396
|
+
const urlFor = (source) => {
|
|
397
|
+
return builder.image(source)
|
|
398
|
+
}
|
|
399
|
+
pub.issues.map((issue) => {
|
|
400
|
+
issue.thumbnail = urlFor(issue.thumbnail).url()
|
|
401
|
+
})
|
|
402
|
+
return { pub, year }
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export default Publication
|
|
406
406
|
*/
|
|
407
407
|
|
|
408
408
|
var generateContentPlacements = function generateContentPlacements(issues) {
|
|
@@ -12,10 +12,10 @@ import { useRouter } from 'next/router';
|
|
|
12
12
|
import { L as LazyLoad } from './index-752d1dae.js';
|
|
13
13
|
import { m as main_40 } from './main-1450d277.js';
|
|
14
14
|
import { c as clean_html_1 } from './entities-932b50cf.js';
|
|
15
|
-
import { A as ADInfeed } from './ADInfeed-
|
|
15
|
+
import { A as ADInfeed } from './ADInfeed-3ee501b9.js';
|
|
16
16
|
import { A as AuthorComponent } from './AuthorComponent-c7ff069f.js';
|
|
17
17
|
import { l as lodash } from './lodash-ad27652f.js';
|
|
18
|
-
import { A as ADlgInfeed } from './ADlgInfeed-
|
|
18
|
+
import { A as ADlgInfeed } from './ADlgInfeed-0bf06b17.js';
|
|
19
19
|
import { g as getContentCategory } from './getContentCategory-15dcc413.js';
|
|
20
20
|
import timeDifferenceCalc from './timeDifferenceCalc.js';
|
|
21
21
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
@@ -7,34 +7,34 @@ import './_commonjsHelpers-0c4b6f40.js';
|
|
|
7
7
|
import 'react-dom';
|
|
8
8
|
import 'prop-types';
|
|
9
9
|
|
|
10
|
-
/*
|
|
11
|
-
Sample query
|
|
12
|
-
let references = ''
|
|
13
|
-
if(article.taxonomyMapping.length > 0){
|
|
14
|
-
article.taxonomyMapping.forEach((ref, index) => {
|
|
15
|
-
references = references + `references('${ref._ref}') `
|
|
16
|
-
if(index+1 !== article.taxonomyMapping.length){
|
|
17
|
-
references = references + ` && `
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
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] {
|
|
23
|
-
...,
|
|
24
|
-
title,
|
|
25
|
-
summary,
|
|
26
|
-
thumbnail,
|
|
27
|
-
url,
|
|
28
|
-
published,
|
|
29
|
-
authorMapping[]->,
|
|
30
|
-
contentCategory->
|
|
31
|
-
}`
|
|
32
|
-
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
33
|
-
|
|
34
|
-
Sample usage
|
|
35
|
-
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
36
|
-
|
|
37
|
-
|
|
10
|
+
/*
|
|
11
|
+
Sample query
|
|
12
|
+
let references = ''
|
|
13
|
+
if(article.taxonomyMapping.length > 0){
|
|
14
|
+
article.taxonomyMapping.forEach((ref, index) => {
|
|
15
|
+
references = references + `references('${ref._ref}') `
|
|
16
|
+
if(index+1 !== article.taxonomyMapping.length){
|
|
17
|
+
references = references + ` && `
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
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] {
|
|
23
|
+
...,
|
|
24
|
+
title,
|
|
25
|
+
summary,
|
|
26
|
+
thumbnail,
|
|
27
|
+
url,
|
|
28
|
+
published,
|
|
29
|
+
authorMapping[]->,
|
|
30
|
+
contentCategory->
|
|
31
|
+
}`
|
|
32
|
+
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
33
|
+
|
|
34
|
+
Sample usage
|
|
35
|
+
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
36
|
+
|
|
37
|
+
|
|
38
38
|
*/
|
|
39
39
|
var RelatedContent = function RelatedContent(props) {
|
|
40
40
|
var client = props.client,
|
|
@@ -14,16 +14,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
14
14
|
_ref$className = _ref.className,
|
|
15
15
|
className = _ref$className === undefined ? '' : _ref$className;
|
|
16
16
|
|
|
17
|
-
/*
|
|
18
|
-
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
19
|
-
example:
|
|
20
|
-
<RelatedTopicDropdown
|
|
21
|
-
page='/clinical'
|
|
22
|
-
exclude="clinical"
|
|
23
|
-
className='mb-3'
|
|
24
|
-
parentTaxonomy={props.parentTaxonomy}
|
|
25
|
-
subTaxonomies={props.subTaxonomies}
|
|
26
|
-
/>
|
|
17
|
+
/*
|
|
18
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
19
|
+
example:
|
|
20
|
+
<RelatedTopicDropdown
|
|
21
|
+
page='/clinical'
|
|
22
|
+
exclude="clinical"
|
|
23
|
+
className='mb-3'
|
|
24
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
25
|
+
subTaxonomies={props.subTaxonomies}
|
|
26
|
+
/>
|
|
27
27
|
*/
|
|
28
28
|
if (subTaxonomies.length === 0 && parentTaxonomy) {
|
|
29
29
|
if (parentTaxonomy.identifier == exclude) {
|
package/dist/esm/SideFooter.js
CHANGED
|
@@ -34,8 +34,8 @@ var renderLink = function renderLink(row) {
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
var SideFooter = function SideFooter(props) {
|
|
37
|
-
/*
|
|
38
|
-
useage example: <SideFooter cache={props.cache} logo='https://mjh-web.s3.amazonaws.com/_media/an_mjhls_brand_logo.png' />
|
|
37
|
+
/*
|
|
38
|
+
useage example: <SideFooter cache={props.cache} logo='https://mjh-web.s3.amazonaws.com/_media/an_mjhls_brand_logo.png' />
|
|
39
39
|
*/
|
|
40
40
|
var _get = get_1(props, 'cache.siteSettingCache', {}),
|
|
41
41
|
socialLinks = _get.socialLinks,
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { useRouter } from 'next/router';
|
|
5
5
|
import Head from 'next/head';
|
|
6
6
|
import { B as BlockContent } from './BlockContent-d8cd739c.js';
|
|
7
|
-
import { g as getSerializers } from './index-
|
|
7
|
+
import { g as getSerializers } from './index-f98ea5e2.js';
|
|
8
8
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
9
9
|
import './es6.string.iterator-aa6068a3.js';
|
|
10
10
|
import './_to-object-97770c52.js';
|
|
@@ -5,7 +5,7 @@ import { B as BlockContent } from './BlockContent-d8cd739c.js';
|
|
|
5
5
|
import Col from 'react-bootstrap/Col';
|
|
6
6
|
import Form from 'react-bootstrap/Form';
|
|
7
7
|
import Button from 'react-bootstrap/Button';
|
|
8
|
-
import { g as getSerializers } from './index-
|
|
8
|
+
import { g as getSerializers } from './index-f98ea5e2.js';
|
|
9
9
|
import VideoSeriesListing from './VideoSeriesListing.js';
|
|
10
10
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
11
11
|
import './es6.string.iterator-aa6068a3.js';
|
|
@@ -14,7 +14,7 @@ import './_object-pie-33c40e79.js';
|
|
|
14
14
|
import './_library-528f1934.js';
|
|
15
15
|
import 'react-dom';
|
|
16
16
|
|
|
17
|
-
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";
|
|
17
|
+
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";
|
|
18
18
|
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" };
|
|
19
19
|
styleInject(css);
|
|
20
20
|
|
|
@@ -37,13 +37,13 @@ import './index.es-c6222053.js';
|
|
|
37
37
|
import './visibility-sensor-082c757b.js';
|
|
38
38
|
import 'react-dom';
|
|
39
39
|
import './index-3f5c03b2.js';
|
|
40
|
-
import './ADlgInfeed-
|
|
40
|
+
import './ADlgInfeed-0bf06b17.js';
|
|
41
41
|
import './stringify-d4839bab.js';
|
|
42
42
|
import './AdSlot.js';
|
|
43
43
|
import './Beam.js';
|
|
44
44
|
import './Segment.js';
|
|
45
45
|
import './main-1450d277.js';
|
|
46
|
-
import './ADInfeed-
|
|
46
|
+
import './ADInfeed-3ee501b9.js';
|
|
47
47
|
import './index-752d1dae.js';
|
|
48
48
|
import './style-inject.es-1f59c1d0.js';
|
|
49
49
|
|
package/dist/esm/View.js
CHANGED
|
@@ -13,10 +13,10 @@ import 'react-bootstrap/Dropdown';
|
|
|
13
13
|
import Form from 'react-bootstrap/Form';
|
|
14
14
|
import FormControl from 'react-bootstrap/FormControl';
|
|
15
15
|
import Button from 'react-bootstrap/Button';
|
|
16
|
-
import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-
|
|
16
|
+
import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-f98ea5e2.js';
|
|
17
17
|
import SocialShare from './SocialShare.js';
|
|
18
18
|
import DFPAdSlot from './AdSlot.js';
|
|
19
|
-
import { g as getTargeting, a as getContentPlacementUrl } from './getTargeting-
|
|
19
|
+
import { g as getTargeting, a as getContentPlacementUrl } from './getTargeting-2d402d66.js';
|
|
20
20
|
import getKeywords from './getKeywords.js';
|
|
21
21
|
import urlFor from './urlFor.js';
|
|
22
22
|
import { _ as _typeof } from './typeof-e9cea9e8.js';
|
|
@@ -250,7 +250,7 @@ var ISI = function ISI(props) {
|
|
|
250
250
|
);
|
|
251
251
|
};
|
|
252
252
|
|
|
253
|
-
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";
|
|
253
|
+
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";
|
|
254
254
|
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" };
|
|
255
255
|
styleInject(css);
|
|
256
256
|
|
package/dist/esm/YoutubeGroup.js
CHANGED
|
@@ -17,10 +17,10 @@ import './core.get-iterator-method-d1d5ed02.js';
|
|
|
17
17
|
import 'react-dom';
|
|
18
18
|
import 'prop-types';
|
|
19
19
|
|
|
20
|
-
/*
|
|
21
|
-
GROQ query -
|
|
22
|
-
accepts an array of title, URL
|
|
23
|
-
`https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
|
|
20
|
+
/*
|
|
21
|
+
GROQ query -
|
|
22
|
+
accepts an array of title, URL
|
|
23
|
+
`https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
var YoutubeGroup = function YoutubeGroup(props) {
|
|
@@ -28,6 +28,7 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
28
28
|
var innerSlider = useRef(null);
|
|
29
29
|
var tileArray = useRef([]);
|
|
30
30
|
var viewableWindow = useRef(null);
|
|
31
|
+
var viewableArea = useRef(null);
|
|
31
32
|
|
|
32
33
|
var _useState = useState(0),
|
|
33
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -71,46 +72,47 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
71
72
|
var setThumbSize = function setThumbSize() {
|
|
72
73
|
var thumbSize = void 0;
|
|
73
74
|
var scrollerVisible = false;
|
|
75
|
+
var tileDividerWidth = parseInt(getComputedStyle(document.documentElement).fontSize) / 2 || 8;
|
|
74
76
|
|
|
75
77
|
if (viewableWindow.current.offsetWidth > 1399) {
|
|
76
|
-
thumbSize = Math.floor(
|
|
78
|
+
thumbSize = Math.floor((viewableArea.current.clientWidth - tileDividerWidth * 5) / 6);
|
|
77
79
|
if (props.dataset.length > 5) {
|
|
78
80
|
scrollerVisible = true;
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
83
|
if (viewableWindow.current.offsetWidth < 1399 && viewableWindow.current.offsetWidth > 992) {
|
|
82
|
-
thumbSize = Math.floor((
|
|
84
|
+
thumbSize = Math.floor((viewableArea.current.clientWidth - tileDividerWidth * 5) / 6);
|
|
83
85
|
if (props.dataset.length > 5) {
|
|
84
86
|
scrollerVisible = true;
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
89
|
if (viewableWindow.current.offsetWidth < 992 && viewableWindow.current.offsetWidth > 768) {
|
|
88
|
-
thumbSize = Math.floor((
|
|
90
|
+
thumbSize = Math.floor((viewableArea.current.clientWidth - tileDividerWidth * 3) / 4);
|
|
89
91
|
if (props.dataset.length > 4) {
|
|
90
92
|
scrollerVisible = true;
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
if (viewableWindow.current.offsetWidth < 768 && viewableWindow.current.offsetWidth > 604) {
|
|
94
|
-
thumbSize = Math.floor((
|
|
96
|
+
thumbSize = Math.floor((viewableArea.current.clientWidth - tileDividerWidth * 2) / 3);
|
|
95
97
|
if (props.dataset.length > 3) {
|
|
96
98
|
scrollerVisible = true;
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
if (viewableWindow.current.offsetWidth < 604) {
|
|
100
|
-
thumbSize = Math.floor(
|
|
102
|
+
thumbSize = Math.floor((viewableArea.current.clientWidth - tileDividerWidth * 2) / 3);
|
|
101
103
|
if (props.dataset.length > 3) {
|
|
102
104
|
scrollerVisible = true;
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
if (main_40) {
|
|
107
|
-
thumbSize = Math.floor(
|
|
109
|
+
thumbSize = Math.floor((viewableArea.current.clientWidth - tileDividerWidth) / 2);
|
|
108
110
|
if (props.dataset.length > 2) {
|
|
109
111
|
scrollerVisible = true;
|
|
110
112
|
}
|
|
111
113
|
}
|
|
112
114
|
if (main_45) {
|
|
113
|
-
thumbSize = Math.floor((
|
|
115
|
+
thumbSize = Math.floor((viewableArea.current.clientWidth - tileDividerWidth * 2) / 3);
|
|
114
116
|
if (props.dataset.length > 3) {
|
|
115
117
|
scrollerVisible = true;
|
|
116
118
|
}
|
|
@@ -202,7 +204,7 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
202
204
|
{ ref: viewableWindow, id: 'vid-slider', style: { maxWidth: '100%' }, className: 'col' },
|
|
203
205
|
React.createElement(
|
|
204
206
|
'div',
|
|
205
|
-
{ className: 'row', style: { display: 'flex', alignItems: 'center' } },
|
|
207
|
+
{ ref: viewableArea, className: 'row', style: { display: 'flex', alignItems: 'center' } },
|
|
206
208
|
showScroller && showScroller && React.createElement(
|
|
207
209
|
'div',
|
|
208
210
|
{
|
|
@@ -2,18 +2,18 @@ import { _ as _extends } from './extends-31d65aba.js';
|
|
|
2
2
|
import { _ as _toConsumableArray } from './toConsumableArray-fa2dcda7.js';
|
|
3
3
|
|
|
4
4
|
var getContentPlacementUrl = function getContentPlacementUrl(cp) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
var cp_url = '';
|
|
6
|
+
if (cp.ancestor && typeof cp.ancestor == 'string') {
|
|
7
|
+
cp_url += (cp_url === '' ? '' : '/') + cp.ancestor;
|
|
8
|
+
}
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
if (!cp.ancestor && cp.parent && typeof cp.parent == 'string') {
|
|
11
|
+
cp_url += (cp_url === '' ? '' : '/') + cp.parent;
|
|
12
|
+
}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
cp_url += (cp_url === '' ? '' : '/') + cp.path;
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
return cp_url;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
var getTargeting = function getTargeting(props) {
|