@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.
Files changed (48) hide show
  1. package/README.md +168 -168
  2. package/dist/cjs/ConferenceArticleCard.js +15 -15
  3. package/dist/cjs/DeckContent.js +8 -8
  4. package/dist/cjs/EventsDeck.js +18 -18
  5. package/dist/cjs/ExternalResources.js +1 -1
  6. package/dist/cjs/HamMagazine.js +9 -9
  7. package/dist/cjs/IssueLanding.js +29 -29
  8. package/dist/cjs/KMTracker.js +15 -15
  9. package/dist/cjs/MasterDeck.js +8 -8
  10. package/dist/cjs/NavMagazine.js +10 -10
  11. package/dist/cjs/NavNative.js +9 -9
  12. package/dist/cjs/PubSection.js +111 -0
  13. package/dist/cjs/PubToc.js +90 -0
  14. package/dist/cjs/PublicationLanding.js +33 -33
  15. package/dist/cjs/RelatedContent.js +28 -28
  16. package/dist/cjs/RelatedTopicsDropdown.js +10 -10
  17. package/dist/cjs/SideFooter.js +2 -2
  18. package/dist/cjs/VideoSeriesCard.js +1 -1
  19. package/dist/cjs/View.js +5 -77
  20. package/dist/cjs/YoutubeGroup.js +4 -4
  21. package/dist/cjs/{getTargeting-963303c6.js → getTargeting-497b581d.js} +9 -9
  22. package/dist/cjs/getTargeting.js +1 -1
  23. package/dist/cjs/{index-cb6ed1fc.js → index-4d74ffd6.js} +29 -29
  24. package/dist/cjs/index.js +6 -2
  25. package/dist/esm/ConferenceArticleCard.js +15 -15
  26. package/dist/esm/DeckContent.js +8 -8
  27. package/dist/esm/EventsDeck.js +18 -18
  28. package/dist/esm/ExternalResources.js +1 -1
  29. package/dist/esm/HamMagazine.js +9 -9
  30. package/dist/esm/IssueLanding.js +29 -29
  31. package/dist/esm/KMTracker.js +15 -15
  32. package/dist/esm/MasterDeck.js +8 -8
  33. package/dist/esm/NavMagazine.js +10 -10
  34. package/dist/esm/NavNative.js +9 -9
  35. package/dist/esm/PubSection.js +105 -0
  36. package/dist/esm/PubToc.js +84 -0
  37. package/dist/esm/PublicationLanding.js +33 -33
  38. package/dist/esm/RelatedContent.js +28 -28
  39. package/dist/esm/RelatedTopicsDropdown.js +10 -10
  40. package/dist/esm/SideFooter.js +2 -2
  41. package/dist/esm/VideoSeriesCard.js +1 -1
  42. package/dist/esm/View.js +5 -77
  43. package/dist/esm/YoutubeGroup.js +4 -4
  44. package/dist/esm/{getTargeting-85315091.js → getTargeting-2d402d66.js} +9 -9
  45. package/dist/esm/getTargeting.js +1 -1
  46. package/dist/esm/{index-750a7380.js → index-ccb770c7.js} +29 -29
  47. package/dist/esm/index.js +4 -2
  48. package/package.json +105 -105
@@ -0,0 +1,111 @@
1
+ 'use strict';
2
+
3
+ var asyncToGenerator = require('./asyncToGenerator-2edcb6ad.js');
4
+ var slicedToArray = require('./slicedToArray-db24842a.js');
5
+ var _extends = require('./extends-1e24fc8d.js');
6
+ var React = require('react');
7
+ var QueueDeckExpanded = require('./QueueDeckExpanded.js');
8
+ require('./_commonjsHelpers-06173234.js');
9
+ require('./es6.string.iterator-20d42c53.js');
10
+ require('./_to-object-821a2927.js');
11
+ require('./web.dom.iterable-4480325a.js');
12
+ require('./_library-dd23b178.js');
13
+ require('./core.get-iterator-method-b4615fd3.js');
14
+ require('./_set-species-a8cfdb84.js');
15
+ require('./_iter-detect-2613ffa1.js');
16
+ require('./_object-pie-68c5bcbc.js');
17
+ require('./toConsumableArray-cf0865fc.js');
18
+ require('react-bootstrap');
19
+ require('./index-d48b231c.js');
20
+ require('./index.es-f3e47207.js');
21
+ require('./moment-aca40de1.js');
22
+ require('./visibility-sensor-8b54af99.js');
23
+ require('react-dom');
24
+ require('./index-0e4427c8.js');
25
+ require('prop-types');
26
+ require('next/router');
27
+ require('./index-80f57cff.js');
28
+ require('./main-dc082238.js');
29
+ require('./entities-3f9d0f2f.js');
30
+ require('./ADInfeed-5fe7fd9d.js');
31
+ require('react-bootstrap/Card');
32
+ require('./AdSlot.js');
33
+ require('./debounce-eb287781.js');
34
+ require('./isSymbol-04666465.js');
35
+ require('./Beam.js');
36
+ require('./stringify-01cf47f7.js');
37
+ require('./Segment.js');
38
+ require('./AuthorComponent-5fa89df5.js');
39
+ require('./lodash-4ef21f0f.js');
40
+ require('./ADlgInfeed-a62d2f9b.js');
41
+ require('./getContentCategory-f38a4c00.js');
42
+ require('./timeDifferenceCalc.js');
43
+
44
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
45
+
46
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
47
+
48
+ var _this = undefined;
49
+
50
+ var PubSection = function PubSection(props) {
51
+ var pubSection = props.pubSection;
52
+
53
+ return React__default['default'].createElement(
54
+ 'div',
55
+ { id: 'pubSection' },
56
+ pubSection.publication && pubSection.publication.name && React__default['default'].createElement(
57
+ 'h2',
58
+ null,
59
+ pubSection.publication.name
60
+ ),
61
+ React__default['default'].createElement(QueueDeckExpanded, _extends._extends({ dataRecord: pubSection.articles }, props))
62
+ );
63
+ };
64
+
65
+ PubSection.getInitialProps = function () {
66
+ var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(ctx, client) {
67
+ var _ctx$query, publication, issue, section, res, params, query, _ref2, _ref3, pubSection;
68
+
69
+ return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
70
+ while (1) {
71
+ switch (_context.prev = _context.next) {
72
+ case 0:
73
+ _ctx$query = ctx.query, publication = _ctx$query.publication, issue = _ctx$query.issue, section = _ctx$query.section, res = ctx.res;
74
+ params = {
75
+ publication: publication,
76
+ section: section
77
+ };
78
+ 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 }';
79
+ _context.next = 5;
80
+ return client.fetch(query, params);
81
+
82
+ case 5:
83
+ _ref2 = _context.sent;
84
+ _ref3 = slicedToArray._slicedToArray(_ref2, 1);
85
+ pubSection = _ref3[0];
86
+
87
+ if (pubSection) {
88
+ _context.next = 11;
89
+ break;
90
+ }
91
+
92
+ res.statusCode = 404;
93
+ return _context.abrupt('return', { show404: true });
94
+
95
+ case 11:
96
+ return _context.abrupt('return', { publication: publication, issue: issue, section: section, pubSection: pubSection });
97
+
98
+ case 12:
99
+ case 'end':
100
+ return _context.stop();
101
+ }
102
+ }
103
+ }, _callee, _this);
104
+ }));
105
+
106
+ return function (_x, _x2) {
107
+ return _ref.apply(this, arguments);
108
+ };
109
+ }();
110
+
111
+ module.exports = PubSection;
@@ -0,0 +1,90 @@
1
+ 'use strict';
2
+
3
+ var asyncToGenerator = require('./asyncToGenerator-2edcb6ad.js');
4
+ var slicedToArray = require('./slicedToArray-db24842a.js');
5
+ var React = require('react');
6
+ require('./_commonjsHelpers-06173234.js');
7
+ require('./es6.string.iterator-20d42c53.js');
8
+ require('./_to-object-821a2927.js');
9
+ require('./web.dom.iterable-4480325a.js');
10
+ require('./_library-dd23b178.js');
11
+ require('./core.get-iterator-method-b4615fd3.js');
12
+ require('./_set-species-a8cfdb84.js');
13
+ require('./_iter-detect-2613ffa1.js');
14
+
15
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
+
17
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
18
+
19
+ var _this = undefined;
20
+
21
+ var PubToc = function PubToc(props) {
22
+ var toc = props.toc;
23
+
24
+ return React__default['default'].createElement(
25
+ 'div',
26
+ { id: 'pubToc' },
27
+ React__default['default'].createElement(
28
+ 'ul',
29
+ null,
30
+ toc && toc.parentSection && Array.isArray(toc.parentSection.sections) && toc.parentSection.sections.map(function (s) {
31
+ return React__default['default'].createElement(
32
+ 'li',
33
+ { key: s.identifier },
34
+ React__default['default'].createElement(
35
+ 'a',
36
+ { href: s.identifier },
37
+ s.name
38
+ )
39
+ );
40
+ })
41
+ )
42
+ );
43
+ };
44
+
45
+ PubToc.getInitialProps = function () {
46
+ var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(ctx, client) {
47
+ var _ctx$query, publication, issue, res, params, query, _ref2, _ref3, toc;
48
+
49
+ return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
50
+ while (1) {
51
+ switch (_context.prev = _context.next) {
52
+ case 0:
53
+ _ctx$query = ctx.query, publication = _ctx$query.publication, issue = _ctx$query.issue, res = ctx.res;
54
+ params = {
55
+ publication: publication
56
+ };
57
+ 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 }';
58
+ _context.next = 5;
59
+ return client.fetch(query, params);
60
+
61
+ case 5:
62
+ _ref2 = _context.sent;
63
+ _ref3 = slicedToArray._slicedToArray(_ref2, 1);
64
+ toc = _ref3[0];
65
+
66
+ if (!(!toc || !toc.parentSection)) {
67
+ _context.next = 11;
68
+ break;
69
+ }
70
+
71
+ res.statusCode = 404;
72
+ return _context.abrupt('return', { show404: true });
73
+
74
+ case 11:
75
+ return _context.abrupt('return', { publication: publication, issue: issue, toc: toc });
76
+
77
+ case 12:
78
+ case 'end':
79
+ return _context.stop();
80
+ }
81
+ }
82
+ }, _callee, _this);
83
+ }));
84
+
85
+ return function (_x, _x2) {
86
+ return _ref.apply(this, arguments);
87
+ };
88
+ }();
89
+
90
+ module.exports = PubToc;
@@ -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) {
@@ -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-5260126b.js');
19
19
  var SocialShare = require('./SocialShare.js');
20
20
  var AdSlot = require('./AdSlot.js');
21
- var getTargeting = require('./getTargeting-963303c6.js');
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');
@@ -206,13 +206,7 @@ var ISI = function ISI(props) {
206
206
  active = _useState2[0],
207
207
  setActive = _useState2[1];
208
208
 
209
- var _useState3 = React.useState(false),
210
- _useState4 = slicedToArray._slicedToArray(_useState3, 2),
211
- bottomOfArticle = _useState4[0],
212
- setbottomOfArticle = _useState4[1];
213
-
214
209
  var isi = React.useRef();
215
-
216
210
  React.useEffect(function () {
217
211
  if (active) {
218
212
  var offset = '5rem';
@@ -227,72 +221,6 @@ var ISI = function ISI(props) {
227
221
  isi.current.style.overflowY = '';
228
222
  }
229
223
  }, [active]);
230
- React.useEffect(function () {
231
- var detectBottomOfArticle = function detectBottomOfArticle() {
232
- var article_body = document.getElementById('article__block');
233
- var isi = document.getElementById('isi');
234
- var articleBottomPosition = article_body.getBoundingClientRect().bottom - window.innerHeight;
235
- console.log(articleBottomPosition, bottomOfArticle);
236
- if (articleBottomPosition < 30 && !isi.classList.contains('in-view')) {
237
- setbottomOfArticle(true);
238
- }
239
- if (articleBottomPosition > 60 && isi.classList.contains('in-view')) {
240
- setbottomOfArticle(false);
241
- }
242
- };
243
- window.addEventListener('scroll', detectBottomOfArticle);
244
- return function () {
245
- return window.removeEventListener('scroll', detectBottomOfArticle);
246
- };
247
- }, []);
248
-
249
- React.useEffect(function () {
250
- var isi = document.getElementById('isi');
251
- if (bottomOfArticle) {
252
- toggleSticky(true);
253
- isi.classList.add('in-view');
254
- if (active) {
255
- setActive(false);
256
- }
257
- }
258
- if (!bottomOfArticle) {
259
- toggleSticky(false);
260
- isi.classList.remove('in-view');
261
- }
262
- }, [bottomOfArticle]);
263
-
264
- var toggleSticky = function toggleSticky(sticky) {
265
- var isiToggle = document.getElementById('isiToggle');
266
- var isiContent = document.getElementById('isiContent');
267
- var isi = document.getElementById('isi');
268
- if (sticky) {
269
- isi.style.bottom = '-200px';
270
- setTimeout(function () {
271
- isi.style.maxHeight = 'unset';
272
- isi.style.position = 'relative';
273
- isi.style.boxShadow = 'none';
274
- isi.style.zIndex = '1';
275
- isi.style.marginTop = '-25rem';
276
- isi.style.marginBottom = '15rem';
277
- isiToggle.style.display = 'none';
278
- isiContent.style.padding = '0';
279
- }, 300);
280
- } else if (!sticky) {
281
-
282
- isi.style.marginBottom = '0';
283
- isi.style.maxHeight = '12rem';
284
- isi.style.position = 'fixed';
285
- isi.style.boxShadow = '0 0 1rem 0 rgba(0, 0, 0, 0.5)';
286
- isi.style.zIndex = '99999';
287
-
288
- isiToggle.style.display = 'block';
289
- isiContent.style.padding = '1rem';
290
- setTimeout(function () {
291
- isi.style.bottom = '0';
292
- isi.style.marginTop = '0';
293
- }, 300);
294
- }
295
- };
296
224
  return React__default['default'].createElement(
297
225
  React__default['default'].Fragment,
298
226
  null,
@@ -327,12 +255,12 @@ var ISI = function ISI(props) {
327
255
  React__default['default'].createElement(
328
256
  'style',
329
257
  { jsx: true },
330
- '\n #isi {\n position: fixed;\n z-index: 9999999;\n bottom: 0;\n left: 0;\n max-height: 12rem;\n background-color: #ffffff;\n overflow-x: hidden;\n overflow-y: hidden;\n width: 100%;\n box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.5);\n transition: bottom .5s ease , margin-top .3s, max-height .2s;\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 '
258
+ '\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 '
331
259
  )
332
260
  );
333
261
  };
334
262
 
335
- 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";
263
+ 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";
336
264
  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" };
337
265
  styleInject_es.styleInject(css);
338
266
 
@@ -887,7 +815,7 @@ var Article = function Article(props) {
887
815
  } },
888
816
  React__default['default'].createElement(
889
817
  'div',
890
- { id: 'article__block' },
818
+ null,
891
819
  React__default['default'].createElement(
892
820
  'div',
893
821
  { className: 'video-detail', style: { marginBottom: isCutomPage(props.article) || showIsi && Array.isArray(isi) && isi.length > 0 ? '15rem' : 0 } },
@@ -1106,7 +1034,7 @@ var Article = function Article(props) {
1106
1034
  )
1107
1035
  )
1108
1036
  ),
1109
- props.infiniteScroll && React__default['default'].createElement('hr', { className: 'article-seperater mb-5 mt-3' })
1037
+ React__default['default'].createElement('hr', { className: 'article-seperater mb-5 mt-3' })
1110
1038
  );
1111
1039
  };
1112
1040
 
@@ -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
- var cp_url = '';
8
- if (cp.ancestor && typeof cp.ancestor == 'string') {
9
- cp_url += (cp_url === '' ? '' : '/') + cp.ancestor;
10
- }
7
+ var cp_url = '';
8
+ if (cp.ancestor && typeof cp.ancestor == 'string') {
9
+ cp_url += (cp_url === '' ? '' : '/') + cp.ancestor;
10
+ }
11
11
 
12
- if (!cp.ancestor && cp.parent && typeof cp.parent == 'string') {
13
- cp_url += (cp_url === '' ? '' : '/') + cp.parent;
14
- }
12
+ if (!cp.ancestor && cp.parent && typeof cp.parent == 'string') {
13
+ cp_url += (cp_url === '' ? '' : '/') + cp.parent;
14
+ }
15
15
 
16
- cp_url += (cp_url === '' ? '' : '/') + cp.path;
16
+ cp_url += (cp_url === '' ? '' : '/') + cp.path;
17
17
 
18
- return cp_url;
18
+ return cp_url;
19
19
  };
20
20
 
21
21
  var getTargeting = function getTargeting(props) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./extends-1e24fc8d.js');
4
4
  require('./toConsumableArray-cf0865fc.js');
5
- var getTargeting = require('./getTargeting-963303c6.js');
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');