@mjhls/mjh-framework 1.0.731-isi-test → 1.0.731
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/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 +9 -9
- 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 +10 -10
- package/dist/cjs/NavNative.js +9 -9
- package/dist/cjs/PubSection.js +111 -0
- package/dist/cjs/PubToc.js +90 -0
- 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 +5 -77
- 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 +6 -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 +9 -9
- 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 +10 -10
- package/dist/esm/NavNative.js +9 -9
- package/dist/esm/PubSection.js +105 -0
- package/dist/esm/PubToc.js +84 -0
- 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 +5 -77
- 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 +4 -2
- package/package.json +105 -105
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,
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-2bd4099a.js';
|
|
2
|
+
import { _ as _slicedToArray } from './slicedToArray-cdeaee08.js';
|
|
3
|
+
import { _ as _extends } from './extends-31d65aba.js';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import QueueDeckExpanded from './QueueDeckExpanded.js';
|
|
6
|
+
import './_commonjsHelpers-0c4b6f40.js';
|
|
7
|
+
import './es6.string.iterator-aa6068a3.js';
|
|
8
|
+
import './_to-object-97770c52.js';
|
|
9
|
+
import './web.dom.iterable-035980f3.js';
|
|
10
|
+
import './_library-528f1934.js';
|
|
11
|
+
import './core.get-iterator-method-d1d5ed02.js';
|
|
12
|
+
import './_set-species-494ed292.js';
|
|
13
|
+
import './_iter-detect-48516cd3.js';
|
|
14
|
+
import './_object-pie-33c40e79.js';
|
|
15
|
+
import './toConsumableArray-fa2dcda7.js';
|
|
16
|
+
import 'react-bootstrap';
|
|
17
|
+
import './index-3f5c03b2.js';
|
|
18
|
+
import './index.es-c6222053.js';
|
|
19
|
+
import './moment-bc12cb97.js';
|
|
20
|
+
import './visibility-sensor-082c757b.js';
|
|
21
|
+
import 'react-dom';
|
|
22
|
+
import './index-888f9253.js';
|
|
23
|
+
import 'prop-types';
|
|
24
|
+
import 'next/router';
|
|
25
|
+
import './index-752d1dae.js';
|
|
26
|
+
import './main-1450d277.js';
|
|
27
|
+
import './entities-932b50cf.js';
|
|
28
|
+
import './ADInfeed-3a9eef39.js';
|
|
29
|
+
import 'react-bootstrap/Card';
|
|
30
|
+
import './AdSlot.js';
|
|
31
|
+
import './debounce-1a993acf.js';
|
|
32
|
+
import './isSymbol-807e927e.js';
|
|
33
|
+
import './Beam.js';
|
|
34
|
+
import './stringify-d4839bab.js';
|
|
35
|
+
import './Segment.js';
|
|
36
|
+
import './AuthorComponent-c7ff069f.js';
|
|
37
|
+
import './lodash-ad27652f.js';
|
|
38
|
+
import './ADlgInfeed-8d63ff91.js';
|
|
39
|
+
import './getContentCategory-15dcc413.js';
|
|
40
|
+
import './timeDifferenceCalc.js';
|
|
41
|
+
|
|
42
|
+
var _this = undefined;
|
|
43
|
+
|
|
44
|
+
var PubSection = function PubSection(props) {
|
|
45
|
+
var pubSection = props.pubSection;
|
|
46
|
+
|
|
47
|
+
return React.createElement(
|
|
48
|
+
'div',
|
|
49
|
+
{ id: 'pubSection' },
|
|
50
|
+
pubSection.publication && pubSection.publication.name && React.createElement(
|
|
51
|
+
'h2',
|
|
52
|
+
null,
|
|
53
|
+
pubSection.publication.name
|
|
54
|
+
),
|
|
55
|
+
React.createElement(QueueDeckExpanded, _extends({ dataRecord: pubSection.articles }, props))
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
PubSection.getInitialProps = function () {
|
|
60
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(ctx, client) {
|
|
61
|
+
var _ctx$query, publication, issue, section, res, params, query, _ref2, _ref3, pubSection;
|
|
62
|
+
|
|
63
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
64
|
+
while (1) {
|
|
65
|
+
switch (_context.prev = _context.next) {
|
|
66
|
+
case 0:
|
|
67
|
+
_ctx$query = ctx.query, publication = _ctx$query.publication, issue = _ctx$query.issue, section = _ctx$query.section, res = ctx.res;
|
|
68
|
+
params = {
|
|
69
|
+
publication: publication,
|
|
70
|
+
section: section
|
|
71
|
+
};
|
|
72
|
+
query = '*[_type == \'publicationSection\'\n && defined(parent)\n && parent->identifier == $publication\n && identifier == $section] {\n ...,\n parent->,\n \'articles\': *[_type == \'article\'\n \t&& !(_id in path("drafts.**")) \n\t\t && defined(title) \n\t\t && defined(url) \n\t\t && is_visible \n\t\t && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock != true\n && references(^._id)] {\n ...,\n contentCategory->,\n authorMapping[]->,\n },\n \'publication\': *[_type == \'publication\'\n && identifier.current == $publication] [0]\n }';
|
|
73
|
+
_context.next = 5;
|
|
74
|
+
return client.fetch(query, params);
|
|
75
|
+
|
|
76
|
+
case 5:
|
|
77
|
+
_ref2 = _context.sent;
|
|
78
|
+
_ref3 = _slicedToArray(_ref2, 1);
|
|
79
|
+
pubSection = _ref3[0];
|
|
80
|
+
|
|
81
|
+
if (pubSection) {
|
|
82
|
+
_context.next = 11;
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
res.statusCode = 404;
|
|
87
|
+
return _context.abrupt('return', { show404: true });
|
|
88
|
+
|
|
89
|
+
case 11:
|
|
90
|
+
return _context.abrupt('return', { publication: publication, issue: issue, section: section, pubSection: pubSection });
|
|
91
|
+
|
|
92
|
+
case 12:
|
|
93
|
+
case 'end':
|
|
94
|
+
return _context.stop();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}, _callee, _this);
|
|
98
|
+
}));
|
|
99
|
+
|
|
100
|
+
return function (_x, _x2) {
|
|
101
|
+
return _ref.apply(this, arguments);
|
|
102
|
+
};
|
|
103
|
+
}();
|
|
104
|
+
|
|
105
|
+
export default PubSection;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-2bd4099a.js';
|
|
2
|
+
import { _ as _slicedToArray } from './slicedToArray-cdeaee08.js';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import './_commonjsHelpers-0c4b6f40.js';
|
|
5
|
+
import './es6.string.iterator-aa6068a3.js';
|
|
6
|
+
import './_to-object-97770c52.js';
|
|
7
|
+
import './web.dom.iterable-035980f3.js';
|
|
8
|
+
import './_library-528f1934.js';
|
|
9
|
+
import './core.get-iterator-method-d1d5ed02.js';
|
|
10
|
+
import './_set-species-494ed292.js';
|
|
11
|
+
import './_iter-detect-48516cd3.js';
|
|
12
|
+
|
|
13
|
+
var _this = undefined;
|
|
14
|
+
|
|
15
|
+
var PubToc = function PubToc(props) {
|
|
16
|
+
var toc = props.toc;
|
|
17
|
+
|
|
18
|
+
return React.createElement(
|
|
19
|
+
'div',
|
|
20
|
+
{ id: 'pubToc' },
|
|
21
|
+
React.createElement(
|
|
22
|
+
'ul',
|
|
23
|
+
null,
|
|
24
|
+
toc && toc.parentSection && Array.isArray(toc.parentSection.sections) && toc.parentSection.sections.map(function (s) {
|
|
25
|
+
return React.createElement(
|
|
26
|
+
'li',
|
|
27
|
+
{ key: s.identifier },
|
|
28
|
+
React.createElement(
|
|
29
|
+
'a',
|
|
30
|
+
{ href: s.identifier },
|
|
31
|
+
s.name
|
|
32
|
+
)
|
|
33
|
+
);
|
|
34
|
+
})
|
|
35
|
+
)
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
PubToc.getInitialProps = function () {
|
|
40
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(ctx, client) {
|
|
41
|
+
var _ctx$query, publication, issue, res, params, query, _ref2, _ref3, toc;
|
|
42
|
+
|
|
43
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
44
|
+
while (1) {
|
|
45
|
+
switch (_context.prev = _context.next) {
|
|
46
|
+
case 0:
|
|
47
|
+
_ctx$query = ctx.query, publication = _ctx$query.publication, issue = _ctx$query.issue, res = ctx.res;
|
|
48
|
+
params = {
|
|
49
|
+
publication: publication
|
|
50
|
+
};
|
|
51
|
+
query = '*[_type == \'publication\'\n && identifier.current == $publication] {\n ...,\n \'parentSection\': *[_type == \'publicationSection\'\n && name == ^.name\n && !defined(parent)] [0] {\n ...,\n \'sections\': *[_type == \'publicationSection\'\n && references(^._id)]\n }\n }';
|
|
52
|
+
_context.next = 5;
|
|
53
|
+
return client.fetch(query, params);
|
|
54
|
+
|
|
55
|
+
case 5:
|
|
56
|
+
_ref2 = _context.sent;
|
|
57
|
+
_ref3 = _slicedToArray(_ref2, 1);
|
|
58
|
+
toc = _ref3[0];
|
|
59
|
+
|
|
60
|
+
if (!(!toc || !toc.parentSection)) {
|
|
61
|
+
_context.next = 11;
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
res.statusCode = 404;
|
|
66
|
+
return _context.abrupt('return', { show404: true });
|
|
67
|
+
|
|
68
|
+
case 11:
|
|
69
|
+
return _context.abrupt('return', { publication: publication, issue: issue, toc: toc });
|
|
70
|
+
|
|
71
|
+
case 12:
|
|
72
|
+
case 'end':
|
|
73
|
+
return _context.stop();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}, _callee, _this);
|
|
77
|
+
}));
|
|
78
|
+
|
|
79
|
+
return function (_x, _x2) {
|
|
80
|
+
return _ref.apply(this, arguments);
|
|
81
|
+
};
|
|
82
|
+
}();
|
|
83
|
+
|
|
84
|
+
export default PubToc;
|
|
@@ -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) {
|
|
@@ -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,
|
|
@@ -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
|
|
package/dist/esm/View.js
CHANGED
|
@@ -16,7 +16,7 @@ import Button from 'react-bootstrap/Button';
|
|
|
16
16
|
import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-d6ad9248.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';
|
|
@@ -196,13 +196,7 @@ var ISI = function ISI(props) {
|
|
|
196
196
|
active = _useState2[0],
|
|
197
197
|
setActive = _useState2[1];
|
|
198
198
|
|
|
199
|
-
var _useState3 = useState(false),
|
|
200
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
201
|
-
bottomOfArticle = _useState4[0],
|
|
202
|
-
setbottomOfArticle = _useState4[1];
|
|
203
|
-
|
|
204
199
|
var isi = useRef();
|
|
205
|
-
|
|
206
200
|
useEffect(function () {
|
|
207
201
|
if (active) {
|
|
208
202
|
var offset = '5rem';
|
|
@@ -217,72 +211,6 @@ var ISI = function ISI(props) {
|
|
|
217
211
|
isi.current.style.overflowY = '';
|
|
218
212
|
}
|
|
219
213
|
}, [active]);
|
|
220
|
-
useEffect(function () {
|
|
221
|
-
var detectBottomOfArticle = function detectBottomOfArticle() {
|
|
222
|
-
var article_body = document.getElementById('article__block');
|
|
223
|
-
var isi = document.getElementById('isi');
|
|
224
|
-
var articleBottomPosition = article_body.getBoundingClientRect().bottom - window.innerHeight;
|
|
225
|
-
console.log(articleBottomPosition, bottomOfArticle);
|
|
226
|
-
if (articleBottomPosition < 30 && !isi.classList.contains('in-view')) {
|
|
227
|
-
setbottomOfArticle(true);
|
|
228
|
-
}
|
|
229
|
-
if (articleBottomPosition > 60 && isi.classList.contains('in-view')) {
|
|
230
|
-
setbottomOfArticle(false);
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
window.addEventListener('scroll', detectBottomOfArticle);
|
|
234
|
-
return function () {
|
|
235
|
-
return window.removeEventListener('scroll', detectBottomOfArticle);
|
|
236
|
-
};
|
|
237
|
-
}, []);
|
|
238
|
-
|
|
239
|
-
useEffect(function () {
|
|
240
|
-
var isi = document.getElementById('isi');
|
|
241
|
-
if (bottomOfArticle) {
|
|
242
|
-
toggleSticky(true);
|
|
243
|
-
isi.classList.add('in-view');
|
|
244
|
-
if (active) {
|
|
245
|
-
setActive(false);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
if (!bottomOfArticle) {
|
|
249
|
-
toggleSticky(false);
|
|
250
|
-
isi.classList.remove('in-view');
|
|
251
|
-
}
|
|
252
|
-
}, [bottomOfArticle]);
|
|
253
|
-
|
|
254
|
-
var toggleSticky = function toggleSticky(sticky) {
|
|
255
|
-
var isiToggle = document.getElementById('isiToggle');
|
|
256
|
-
var isiContent = document.getElementById('isiContent');
|
|
257
|
-
var isi = document.getElementById('isi');
|
|
258
|
-
if (sticky) {
|
|
259
|
-
isi.style.bottom = '-200px';
|
|
260
|
-
setTimeout(function () {
|
|
261
|
-
isi.style.maxHeight = 'unset';
|
|
262
|
-
isi.style.position = 'relative';
|
|
263
|
-
isi.style.boxShadow = 'none';
|
|
264
|
-
isi.style.zIndex = '1';
|
|
265
|
-
isi.style.marginTop = '-25rem';
|
|
266
|
-
isi.style.marginBottom = '15rem';
|
|
267
|
-
isiToggle.style.display = 'none';
|
|
268
|
-
isiContent.style.padding = '0';
|
|
269
|
-
}, 300);
|
|
270
|
-
} else if (!sticky) {
|
|
271
|
-
|
|
272
|
-
isi.style.marginBottom = '0';
|
|
273
|
-
isi.style.maxHeight = '12rem';
|
|
274
|
-
isi.style.position = 'fixed';
|
|
275
|
-
isi.style.boxShadow = '0 0 1rem 0 rgba(0, 0, 0, 0.5)';
|
|
276
|
-
isi.style.zIndex = '99999';
|
|
277
|
-
|
|
278
|
-
isiToggle.style.display = 'block';
|
|
279
|
-
isiContent.style.padding = '1rem';
|
|
280
|
-
setTimeout(function () {
|
|
281
|
-
isi.style.bottom = '0';
|
|
282
|
-
isi.style.marginTop = '0';
|
|
283
|
-
}, 300);
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
214
|
return React.createElement(
|
|
287
215
|
React.Fragment,
|
|
288
216
|
null,
|
|
@@ -317,12 +245,12 @@ var ISI = function ISI(props) {
|
|
|
317
245
|
React.createElement(
|
|
318
246
|
'style',
|
|
319
247
|
{ jsx: true },
|
|
320
|
-
'\n #isi {\n position: fixed;\n z-index:
|
|
248
|
+
'\n #isi {\n position: fixed;\n z-index: 99999;\n bottom: 0;\n left: 0;\n max-height: 10rem;\n background-color: #ffffff;\n overflow-x: hidden;\n overflow-y: hidden;\n transition: max-height 0.2s;\n width: 100%;\n box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.5);\n }\n #isiContent {\n width: 100%;\n max-width: 1000px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n padding: 1rem;\n font-size: 1rem;\n }\n #isi::-webkit-scrollbar {\n display: none;\n }\n #isiToggle {\n position: absolute;\n top: 0;\n right: 0;\n padding: 1rem;\n font-weight: bold;\n cursor: pointer;\n font-size: 1rem;\n }\n #isiToggle p {\n margin: 0;\n }\n '
|
|
321
249
|
)
|
|
322
250
|
);
|
|
323
251
|
};
|
|
324
252
|
|
|
325
|
-
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";
|
|
326
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" };
|
|
327
255
|
styleInject(css);
|
|
328
256
|
|
|
@@ -877,7 +805,7 @@ var Article = function Article(props) {
|
|
|
877
805
|
} },
|
|
878
806
|
React.createElement(
|
|
879
807
|
'div',
|
|
880
|
-
|
|
808
|
+
null,
|
|
881
809
|
React.createElement(
|
|
882
810
|
'div',
|
|
883
811
|
{ className: 'video-detail', style: { marginBottom: isCutomPage(props.article) || showIsi && Array.isArray(isi) && isi.length > 0 ? '15rem' : 0 } },
|
|
@@ -1096,7 +1024,7 @@ var Article = function Article(props) {
|
|
|
1096
1024
|
)
|
|
1097
1025
|
)
|
|
1098
1026
|
),
|
|
1099
|
-
|
|
1027
|
+
React.createElement('hr', { className: 'article-seperater mb-5 mt-3' })
|
|
1100
1028
|
);
|
|
1101
1029
|
};
|
|
1102
1030
|
|
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) {
|
|
@@ -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) {
|
package/dist/esm/getTargeting.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './extends-31d65aba.js';
|
|
2
2
|
import './toConsumableArray-fa2dcda7.js';
|
|
3
|
-
export { g as default } from './getTargeting-
|
|
3
|
+
export { g as default } from './getTargeting-2d402d66.js';
|
|
4
4
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
5
5
|
import './_to-object-97770c52.js';
|
|
6
6
|
import './_object-pie-33c40e79.js';
|