@mjhls/mjh-framework 1.0.464 → 1.0.466

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 (124) hide show
  1. package/README.md +171 -171
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +3 -3
  4. package/dist/cjs/AD300x250x600.js +3 -3
  5. package/dist/cjs/AD728x90.js +3 -3
  6. package/dist/cjs/ADFloatingFooter.js +2 -2
  7. package/dist/cjs/ADGutter.js +2 -2
  8. package/dist/cjs/ADSponsoredResources.js +2 -2
  9. package/dist/cjs/ADWebcast.js +2 -2
  10. package/dist/cjs/ADWelcome.js +2 -2
  11. package/dist/cjs/AdSlot.js +2 -2
  12. package/dist/cjs/AdSlotsProvider.js +1 -1
  13. package/dist/cjs/ArticleQueue.js +7 -7
  14. package/dist/cjs/Auth.js +301 -250
  15. package/dist/cjs/CMEDeck.js +5 -5
  16. package/dist/cjs/Column3.js +4 -4
  17. package/dist/cjs/ConferenceArticleCard.js +16 -16
  18. package/dist/cjs/DeckContent.js +14 -14
  19. package/dist/cjs/DeckQueue.js +5 -5
  20. package/dist/cjs/{Dfp-fcdeabc4.js → Dfp-fbe32b96.js} +1 -1
  21. package/dist/cjs/EventsDeck.js +21 -21
  22. package/dist/cjs/Feature.js +2 -2
  23. package/dist/cjs/ForbesHero.js +1 -1
  24. package/dist/cjs/GridContent.js +10 -10
  25. package/dist/cjs/GridHero.js +1 -1
  26. package/dist/cjs/GroupDeck.js +4 -4
  27. package/dist/cjs/HamMagazine.js +11 -11
  28. package/dist/cjs/HorizontalHero.js +1 -1
  29. package/dist/cjs/IssueContentDeck.js +1 -1
  30. package/dist/cjs/IssueDeck.js +1 -1
  31. package/dist/cjs/IssueLanding.js +35 -35
  32. package/dist/cjs/KMTracker.js +15 -15
  33. package/dist/cjs/LeftNav.js +2 -2
  34. package/dist/cjs/MasterDeck.js +15 -15
  35. package/dist/cjs/NavMagazine.js +12 -12
  36. package/dist/cjs/NavNative.js +11 -11
  37. package/dist/cjs/OncliveHero.js +1 -1
  38. package/dist/cjs/OncliveLargeHero.js +1 -1
  39. package/dist/cjs/PublicationLanding.js +33 -33
  40. package/dist/cjs/QueueDeckExpanded.js +14 -8
  41. package/dist/cjs/RelatedContent.js +29 -29
  42. package/dist/cjs/RelatedTopicsDropdown.js +10 -10
  43. package/dist/cjs/SideFooter.js +2 -2
  44. package/dist/cjs/TemplateNormal.js +2 -2
  45. package/dist/cjs/VerticalHero.js +1 -1
  46. package/dist/cjs/VideoSeriesFilter.js +1 -1
  47. package/dist/cjs/VideoSeriesListing.js +3 -3
  48. package/dist/cjs/View.js +13 -13
  49. package/dist/cjs/YahooHero.js +1 -1
  50. package/dist/cjs/YoutubeGroup.js +4 -4
  51. package/dist/cjs/getQuery.js +1 -1
  52. package/dist/cjs/getSerializers.js +4 -4
  53. package/dist/cjs/{getTargeting-3ced038f.js → getTargeting-b15993cb.js} +16 -9
  54. package/dist/cjs/getTargeting.js +1 -1
  55. package/dist/cjs/{index-fa3cec70.js → index-f7ee1612.js} +4 -6
  56. package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
  57. package/dist/cjs/index.js +7 -7
  58. package/dist/cjs/{main-00905561.js → main-bc4db521.js} +61 -30
  59. package/dist/cjs/{moment-3cf060f6.js → moment-66a6a284.js} +5 -5
  60. package/dist/cjs/urlFor.js +1 -1
  61. package/dist/esm/AD.js +1 -1
  62. package/dist/esm/AD300x250.js +3 -3
  63. package/dist/esm/AD300x250x600.js +3 -3
  64. package/dist/esm/AD728x90.js +3 -3
  65. package/dist/esm/ADFloatingFooter.js +2 -2
  66. package/dist/esm/ADGutter.js +2 -2
  67. package/dist/esm/ADSponsoredResources.js +2 -2
  68. package/dist/esm/ADWebcast.js +2 -2
  69. package/dist/esm/ADWelcome.js +2 -2
  70. package/dist/esm/AdSlot.js +2 -2
  71. package/dist/esm/AdSlotsProvider.js +1 -1
  72. package/dist/esm/ArticleQueue.js +7 -7
  73. package/dist/esm/Auth.js +301 -250
  74. package/dist/esm/CMEDeck.js +5 -5
  75. package/dist/esm/Column3.js +4 -4
  76. package/dist/esm/ConferenceArticleCard.js +16 -16
  77. package/dist/esm/DeckContent.js +14 -14
  78. package/dist/esm/DeckQueue.js +5 -5
  79. package/dist/esm/{Dfp-58cfc45a.js → Dfp-6d2b24a0.js} +1 -1
  80. package/dist/esm/EventsDeck.js +21 -21
  81. package/dist/esm/Feature.js +2 -2
  82. package/dist/esm/ForbesHero.js +1 -1
  83. package/dist/esm/GridContent.js +10 -10
  84. package/dist/esm/GridHero.js +1 -1
  85. package/dist/esm/GroupDeck.js +4 -4
  86. package/dist/esm/HamMagazine.js +11 -11
  87. package/dist/esm/HorizontalHero.js +1 -1
  88. package/dist/esm/IssueContentDeck.js +1 -1
  89. package/dist/esm/IssueDeck.js +1 -1
  90. package/dist/esm/IssueLanding.js +35 -35
  91. package/dist/esm/KMTracker.js +15 -15
  92. package/dist/esm/LeftNav.js +2 -2
  93. package/dist/esm/MasterDeck.js +15 -15
  94. package/dist/esm/NavMagazine.js +12 -12
  95. package/dist/esm/NavNative.js +11 -11
  96. package/dist/esm/OncliveHero.js +1 -1
  97. package/dist/esm/OncliveLargeHero.js +1 -1
  98. package/dist/esm/PublicationLanding.js +33 -33
  99. package/dist/esm/QueueDeckExpanded.js +14 -8
  100. package/dist/esm/RelatedContent.js +29 -29
  101. package/dist/esm/RelatedTopicsDropdown.js +10 -10
  102. package/dist/esm/SideFooter.js +2 -2
  103. package/dist/esm/TemplateNormal.js +2 -2
  104. package/dist/esm/VerticalHero.js +1 -1
  105. package/dist/esm/VideoSeriesFilter.js +1 -1
  106. package/dist/esm/VideoSeriesListing.js +3 -3
  107. package/dist/esm/View.js +13 -13
  108. package/dist/esm/YahooHero.js +1 -1
  109. package/dist/esm/YoutubeGroup.js +4 -4
  110. package/dist/esm/getQuery.js +1 -1
  111. package/dist/esm/getSerializers.js +4 -4
  112. package/dist/esm/{getTargeting-8f4bd5db.js → getTargeting-1a0bd08d.js} +16 -9
  113. package/dist/esm/getTargeting.js +1 -1
  114. package/dist/esm/{index-3f4dd6f2.js → index-93ec3c59.js} +4 -6
  115. package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
  116. package/dist/esm/index.js +7 -7
  117. package/dist/esm/{main-adf6ec37.js → main-7255814e.js} +60 -29
  118. package/dist/esm/{moment-49ae13fa.js → moment-12415288.js} +5 -5
  119. package/dist/esm/urlFor.js +1 -1
  120. package/package.json +105 -105
  121. /package/dist/cjs/{ADInfeed-4b904089.js → ADInfeed-8a7f1d50.js} +0 -0
  122. /package/dist/cjs/{ADlgInfeed-f540f438.js → ADlgInfeed-659b82b6.js} +0 -0
  123. /package/dist/esm/{ADInfeed-23148e88.js → ADInfeed-dbd65900.js} +0 -0
  124. /package/dist/esm/{ADlgInfeed-5460339b.js → ADlgInfeed-a385f968.js} +0 -0
@@ -13,21 +13,21 @@ import './web.dom.iterable-46c95e52.js';
13
13
  import './typeof-5f046efd.js';
14
14
  import './_is-array-dd5523d6.js';
15
15
  import React__default from 'react';
16
- import { l as lib_3 } from './index-3f4dd6f2.js';
16
+ import { l as lib_3 } from './index-93ec3c59.js';
17
17
  import 'prop-types';
18
18
  import Container from 'react-bootstrap/Container';
19
19
  import 'react-bootstrap/Row';
20
20
  import 'react-bootstrap/Col';
21
21
  import 'react-bootstrap/Card';
22
- import './moment-49ae13fa.js';
22
+ import './moment-12415288.js';
23
23
  import { withRouter } from 'next/router';
24
24
  import './isSymbol-c1b9be80.js';
25
25
  import { d as debounce_1 } from './debounce-8cd9e09c.js';
26
- import { I as InfiniteScroll } from './index.es-29c1cef5.js';
26
+ import { I as InfiniteScroll } from './index.es-938a3a58.js';
27
27
  import 'react-dom';
28
28
  import { V as VisibilitySensor } from './visibility-sensor-0baa4eea.js';
29
29
  import './index-51a80699.js';
30
- import { m as main_36 } from './main-adf6ec37.js';
30
+ import { m as main_39 } from './main-7255814e.js';
31
31
  import './slicedToArray-f1e40361.js';
32
32
  import './stringify-e30bc114.js';
33
33
  import { _ as _Promise } from './asyncToGenerator-0379e924.js';
@@ -35,9 +35,9 @@ import './_set-species-6f64f1c1.js';
35
35
  import './Beam.js';
36
36
  import './Segment.js';
37
37
  import './AdSlot.js';
38
- import { A as ADInfeed } from './ADInfeed-23148e88.js';
38
+ import { A as ADInfeed } from './ADInfeed-dbd65900.js';
39
39
  import { l as lodash } from './lodash-17fdfebb.js';
40
- import { A as ADlgInfeed } from './ADlgInfeed-5460339b.js';
40
+ import { A as ADlgInfeed } from './ADlgInfeed-a385f968.js';
41
41
 
42
42
  var MasterDeck = function (_React$Component) {
43
43
  _inherits(MasterDeck, _React$Component);
@@ -188,14 +188,14 @@ var MasterDeck = function (_React$Component) {
188
188
  }
189
189
 
190
190
  // please leave this for later debug purpose : Yong Jun.
191
- /* console.log('page change reported', {
192
- currentPage: currentPage,
193
- pageNumber: pageNumber,
194
- pathname: pathname,
195
- path: path,
196
- newPath: newPath,
197
- firstPage: pageNumber === 1,
198
- queryString: queryString
191
+ /* console.log('page change reported', {
192
+ currentPage: currentPage,
193
+ pageNumber: pageNumber,
194
+ pathname: pathname,
195
+ path: path,
196
+ newPath: newPath,
197
+ firstPage: pageNumber === 1,
198
+ queryString: queryString
199
199
  }) */
200
200
 
201
201
  if (pageview) {
@@ -305,7 +305,7 @@ var MasterDeck = function (_React$Component) {
305
305
  'div',
306
306
  null,
307
307
  React__default.createElement(_this2.Deck, { data: row, variant: variant, index: index, client: _this.props.client, defaultImage: _this.defaultImage }),
308
- main_36 && _this.rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && React__default.createElement(
308
+ main_39 && _this.rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && React__default.createElement(
309
309
  'div',
310
310
  { className: 'ad-container', style: { margin: '0 auto' } },
311
311
  _this.renderMobileAd(index, numberOfItemsBeforeAd, _this.rightItems)
@@ -5,7 +5,7 @@ import './web.dom.iterable-46c95e52.js';
5
5
  import React__default, { useRef, useState, useEffect } from 'react';
6
6
  import 'prop-types';
7
7
  import Container from 'react-bootstrap/Container';
8
- import { a as main_37 } from './main-adf6ec37.js';
8
+ import { a as main_40 } from './main-7255814e.js';
9
9
  import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
10
10
  import './react-social-icons-a7d5c5c7.js';
11
11
  import './iconBase-6ee2f2fb.js';
@@ -22,16 +22,16 @@ import { N as NavFooter } from './NavFooter-e27bd93b.js';
22
22
  import { S as SocialNavFooter } from './SocialNavFooter-4fb16720.js';
23
23
 
24
24
  var NavMagazine = function NavMagazine(props) {
25
- /*
26
- Example Nav with acceptable props
27
- <MagazineNav
28
- showLogin
29
- user={props.cache.user}
30
- logo={props.settings.logo}
31
- dataObject={props.cache.mainNavCache}
32
- website={website}
33
- subNav={props.cache.subNavCache}
34
- />
25
+ /*
26
+ Example Nav with acceptable props
27
+ <MagazineNav
28
+ showLogin
29
+ user={props.cache.user}
30
+ logo={props.settings.logo}
31
+ dataObject={props.cache.mainNavCache}
32
+ website={website}
33
+ subNav={props.cache.subNavCache}
34
+ />
35
35
  */
36
36
 
37
37
  var logo = props.logo,
@@ -230,7 +230,7 @@ var NavMagazine = function NavMagazine(props) {
230
230
  ),
231
231
  React__default.createElement(
232
232
  Navbar,
233
- { id: 'navbar-ham', className: main_37 ? 'bottom-nav ios-nav' : 'bottom-nav ', variant: 'dark', expand: 'xl', bg: 'primary', sticky: 'top', ref: navRef },
233
+ { id: 'navbar-ham', className: main_40 ? 'bottom-nav ios-nav' : 'bottom-nav ', variant: 'dark', expand: 'xl', bg: 'primary', sticky: 'top', ref: navRef },
234
234
  React__default.createElement(
235
235
  Container,
236
236
  { className: 'mobile-nav android-nav' },
@@ -5,7 +5,7 @@ import './web.dom.iterable-46c95e52.js';
5
5
  import React__default, { useRef, useState, useEffect } from 'react';
6
6
  import 'prop-types';
7
7
  import Container from 'react-bootstrap/Container';
8
- import { a as main_37 } from './main-adf6ec37.js';
8
+ import { a as main_40 } from './main-7255814e.js';
9
9
  import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
10
10
  import './react-social-icons-a7d5c5c7.js';
11
11
  import './iconBase-6ee2f2fb.js';
@@ -22,15 +22,15 @@ import { N as NavFooter } from './NavFooter-e27bd93b.js';
22
22
  import { S as SocialNavFooter } from './SocialNavFooter-4fb16720.js';
23
23
 
24
24
  var NavNative = function NavNative(props) {
25
- /*
26
- Example Nav with acceptable props
27
- <MagazineNav
28
- showLogin
29
- logo={props.settings.logo}
30
- dataObject={props.cache.mainNavCache}
31
- website={website}
32
- subNav={props.cache.subNavCache}
33
- />
25
+ /*
26
+ Example Nav with acceptable props
27
+ <MagazineNav
28
+ showLogin
29
+ logo={props.settings.logo}
30
+ dataObject={props.cache.mainNavCache}
31
+ website={website}
32
+ subNav={props.cache.subNavCache}
33
+ />
34
34
  */
35
35
 
36
36
  var logo = props.logo,
@@ -83,7 +83,7 @@ var NavNative = function NavNative(props) {
83
83
  React__default.createElement(
84
84
  Navbar,
85
85
  {
86
- className: main_37 ? 'bottom-nav ios-nav' : 'bottom-nav android-nav',
86
+ className: main_40 ? 'bottom-nav ios-nav' : 'bottom-nav android-nav',
87
87
  variant: 'dark',
88
88
  expand: 'lg',
89
89
  bg: 'primary',
@@ -1,6 +1,6 @@
1
1
  import './_commonjsHelpers-0c4b6f40.js';
2
2
  import React__default from 'react';
3
- import { m as moment } from './moment-49ae13fa.js';
3
+ import { m as moment } from './moment-12415288.js';
4
4
  import { i as imageUrlBuilder } from './index-51a80699.js';
5
5
  import './iconBase-6ee2f2fb.js';
6
6
  import 'react-bootstrap/Badge';
@@ -4,7 +4,7 @@ import './core.get-iterator-method-f5c0d66a.js';
4
4
  import './web.dom.iterable-46c95e52.js';
5
5
  import React__default from 'react';
6
6
  import 'prop-types';
7
- import { m as moment } from './moment-49ae13fa.js';
7
+ import { m as moment } from './moment-12415288.js';
8
8
  import 'react-dom';
9
9
  import { i as imageUrlBuilder } from './index-51a80699.js';
10
10
  import { L as LazyLoad } from './index-5f9f807a.js';
@@ -367,39 +367,39 @@ module.exports = { "default": set, __esModule: true };
367
367
 
368
368
  var _Set = unwrapExports(set$1);
369
369
 
370
- /* usage & query
371
- const Publication = (props) => {
372
- const { cache, pub, year } = props
373
-
374
- const targeting = {
375
- content_placement: [`/journals/${pub.identifier.current}`],
376
- document_url: [`/journals/${pub.identifier.current}`],
377
- }
378
-
379
- return (
380
- <Shell title={pub.name} cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3'>
381
- <PublicationLanding publication={pub} year={year} href={'journals'} />
382
- </Shell>
383
- )
384
- }
385
-
386
- Publication.getInitialProps = async (ctx) => {
387
- const { query } = ctx
388
- const {
389
- query: { year },
390
- } = ctx
391
- const pub = await client.fetch(getQuery('publication'), query)
392
- const builder = imageUrlBuilder(client)
393
- const urlFor = (source) => {
394
- return builder.image(source)
395
- }
396
- pub.issues.map((issue) => {
397
- issue.thumbnail = urlFor(issue.thumbnail).url()
398
- })
399
- return { pub, year }
400
- }
401
-
402
- export default Publication
370
+ /* usage & query
371
+ const Publication = (props) => {
372
+ const { cache, pub, year } = props
373
+
374
+ const targeting = {
375
+ content_placement: [`/journals/${pub.identifier.current}`],
376
+ document_url: [`/journals/${pub.identifier.current}`],
377
+ }
378
+
379
+ return (
380
+ <Shell title={pub.name} cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3'>
381
+ <PublicationLanding publication={pub} year={year} href={'journals'} />
382
+ </Shell>
383
+ )
384
+ }
385
+
386
+ Publication.getInitialProps = async (ctx) => {
387
+ const { query } = ctx
388
+ const {
389
+ query: { year },
390
+ } = ctx
391
+ const pub = await client.fetch(getQuery('publication'), query)
392
+ const builder = imageUrlBuilder(client)
393
+ const urlFor = (source) => {
394
+ return builder.image(source)
395
+ }
396
+ pub.issues.map((issue) => {
397
+ issue.thumbnail = urlFor(issue.thumbnail).url()
398
+ })
399
+ return { pub, year }
400
+ }
401
+
402
+ export default Publication
403
403
  */
404
404
 
405
405
  var PublicationLanding = function PublicationLanding(props) {
@@ -9,19 +9,19 @@ import './_object-pie-33c40e79.js';
9
9
  import { _ as _extends } from './extends-6e00b262.js';
10
10
  import './web.dom.iterable-46c95e52.js';
11
11
  import React__default, { useEffect, useState, useRef } from 'react';
12
- import { l as lib_3 } from './index-3f4dd6f2.js';
12
+ import { l as lib_3 } from './index-93ec3c59.js';
13
13
  import 'prop-types';
14
14
  import 'react-bootstrap/Card';
15
- import { m as moment } from './moment-49ae13fa.js';
15
+ import { m as moment } from './moment-12415288.js';
16
16
  import { useRouter } from 'next/router';
17
17
  import './isSymbol-c1b9be80.js';
18
18
  import './debounce-8cd9e09c.js';
19
- import { I as InfiniteScroll } from './index.es-29c1cef5.js';
19
+ import { I as InfiniteScroll } from './index.es-938a3a58.js';
20
20
  import 'react-dom';
21
21
  import { V as VisibilitySensor } from './visibility-sensor-0baa4eea.js';
22
22
  import { i as imageUrlBuilder } from './index-51a80699.js';
23
23
  import { L as LazyLoad } from './index-5f9f807a.js';
24
- import { m as main_36 } from './main-adf6ec37.js';
24
+ import { m as main_39 } from './main-7255814e.js';
25
25
  import { c as clean_html_1 } from './entities-7cc3bf45.js';
26
26
  import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
27
27
  import './stringify-e30bc114.js';
@@ -30,9 +30,9 @@ import './_set-species-6f64f1c1.js';
30
30
  import './Beam.js';
31
31
  import './Segment.js';
32
32
  import './AdSlot.js';
33
- import { A as ADInfeed } from './ADInfeed-23148e88.js';
33
+ import { A as ADInfeed } from './ADInfeed-dbd65900.js';
34
34
  import { l as lodash } from './lodash-17fdfebb.js';
35
- import { A as ADlgInfeed } from './ADlgInfeed-5460339b.js';
35
+ import { A as ADlgInfeed } from './ADlgInfeed-a385f968.js';
36
36
  import { A as AuthorComponent } from './AuthorComponent-158226c9.js';
37
37
  import { Container, Media } from 'react-bootstrap';
38
38
 
@@ -117,6 +117,8 @@ var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pagevi
117
117
  }
118
118
 
119
119
  // pageNumber = parseInt(pageNumber)
120
+ console.log('itemIndex:', itemIndex);
121
+ console.log('itemsPerPage:', itemsPerPage);
120
122
 
121
123
  var index = Number(itemIndex);
122
124
  var perPage = Number(itemsPerPage);
@@ -130,6 +132,8 @@ var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pagevi
130
132
  if (path[0] !== '/') {
131
133
  path = '/' + path;
132
134
  }
135
+
136
+ console.log('pageNumber:', pageNumber);
133
137
  var newPath = pageNumber === 1 ? '' + path : '' + path + (queryString.length > 0 ? '&' : '?') + 'page=' + pageNumber;
134
138
 
135
139
  // if (pageview) {
@@ -447,7 +451,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
447
451
  } else if (article._type === 'brandInsightAd' && article.adUnit) {
448
452
  return React__default.createElement(ADInfeed, { index: index, infeedAd: article });
449
453
  }
450
- if (main_36 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0) {
454
+ if (main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0) {
451
455
  return renderMobileAd(index, numberOfItemsBeforeAd, rightItems);
452
456
  }
453
457
 
@@ -458,7 +462,9 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
458
462
  key: article._id ? article._id : index,
459
463
  onChange: function onChange(isVisible) {
460
464
  // Passing 'articleCount' instead of index because index will be including the indexes of ads whereas articleCount will be having index of artilce only.
461
- isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, article.articleCount);
465
+ console.log('article.articleCount:', article.articleCount, article);
466
+
467
+ isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, article.articleCount ? article.articleCount : index);
462
468
  } },
463
469
  React__default.createElement(
464
470
  React__default.Fragment,
@@ -1,37 +1,37 @@
1
1
  import './_commonjsHelpers-0c4b6f40.js';
2
2
  import React__default from 'react';
3
- import { m as moment } from './moment-49ae13fa.js';
3
+ import { m as moment } from './moment-12415288.js';
4
4
  import { i as imageUrlBuilder } from './index-51a80699.js';
5
5
  import 'react-bootstrap/Media';
6
6
 
7
- /*
8
- Sample query
9
- let references = ''
10
- if(article.taxonomyMapping.length > 0){
11
- article.taxonomyMapping.forEach((ref, index) => {
12
- references = references + `references('${ref._ref}') `
13
- if(index+1 !== article.taxonomyMapping.length){
14
- references = references + ` && `
15
- }
16
- })
17
- }
18
-
19
- 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] {
20
- ...,
21
- title,
22
- summary,
23
- thumbnail,
24
- url,
25
- published,
26
- authorMapping[]->,
27
- contentCategory->
28
- }`
29
- const relatedArticles = await client.fetch(relatedArticlesQuery)
30
-
31
- Sample usage
32
- <RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
33
-
34
-
7
+ /*
8
+ Sample query
9
+ let references = ''
10
+ if(article.taxonomyMapping.length > 0){
11
+ article.taxonomyMapping.forEach((ref, index) => {
12
+ references = references + `references('${ref._ref}') `
13
+ if(index+1 !== article.taxonomyMapping.length){
14
+ references = references + ` && `
15
+ }
16
+ })
17
+ }
18
+
19
+ 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] {
20
+ ...,
21
+ title,
22
+ summary,
23
+ thumbnail,
24
+ url,
25
+ published,
26
+ authorMapping[]->,
27
+ contentCategory->
28
+ }`
29
+ const relatedArticles = await client.fetch(relatedArticlesQuery)
30
+
31
+ Sample usage
32
+ <RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
33
+
34
+
35
35
  */
36
36
  var RelatedContent = function RelatedContent(props) {
37
37
  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) {
@@ -24,8 +24,8 @@ var renderLink = function renderLink(row) {
24
24
  };
25
25
 
26
26
  var SideFooter = function SideFooter(props) {
27
- /*
28
- useage example: <SideFooter cache={props.cache} logo='https://mjh-web.s3.amazonaws.com/_media/an_mjhls_brand_logo.png' />
27
+ /*
28
+ useage example: <SideFooter cache={props.cache} logo='https://mjh-web.s3.amazonaws.com/_media/an_mjhls_brand_logo.png' />
29
29
  */
30
30
  var _get = get_1(props, 'cache.siteSettingCache', {}),
31
31
  socialLinks = _get.socialLinks,
@@ -5,7 +5,7 @@ import './_library-528f1934.js';
5
5
  import './_iter-detect-6e099a34.js';
6
6
  import './web.dom.iterable-46c95e52.js';
7
7
  import React__default, { useState, useEffect } from 'react';
8
- import './index-3f4dd6f2.js';
8
+ import './index-93ec3c59.js';
9
9
  import 'prop-types';
10
10
  import Container from 'react-bootstrap/Container';
11
11
  import 'react-bootstrap/Row';
@@ -13,7 +13,7 @@ import 'react-bootstrap/Col';
13
13
  import { useRouter } from 'next/router';
14
14
  import './isSymbol-c1b9be80.js';
15
15
  import './debounce-8cd9e09c.js';
16
- import './main-adf6ec37.js';
16
+ import './main-7255814e.js';
17
17
  import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
18
18
  import './stringify-e30bc114.js';
19
19
  import './asyncToGenerator-0379e924.js';
@@ -1,6 +1,6 @@
1
1
  import './_commonjsHelpers-0c4b6f40.js';
2
2
  import React__default from 'react';
3
- import './moment-49ae13fa.js';
3
+ import './moment-12415288.js';
4
4
  import { i as imageUrlBuilder } from './index-51a80699.js';
5
5
 
6
6
  var VerticalHero = function VerticalHero(props) {
@@ -5,7 +5,7 @@ import './_library-528f1934.js';
5
5
  import './_iter-detect-6e099a34.js';
6
6
  import './web.dom.iterable-46c95e52.js';
7
7
  import React__default, { useState, useEffect } from 'react';
8
- import { m as moment } from './moment-49ae13fa.js';
8
+ import { m as moment } from './moment-12415288.js';
9
9
  import { withRouter } from 'next/router';
10
10
  import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
11
11
  import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-0379e924.js';
@@ -10,14 +10,14 @@ import './web.dom.iterable-46c95e52.js';
10
10
  import './typeof-5f046efd.js';
11
11
  import './_is-array-dd5523d6.js';
12
12
  import React__default from 'react';
13
- import { l as lib_3 } from './index-3f4dd6f2.js';
13
+ import { l as lib_3 } from './index-93ec3c59.js';
14
14
  import 'prop-types';
15
15
  import Container from 'react-bootstrap/Container';
16
- import './moment-49ae13fa.js';
16
+ import './moment-12415288.js';
17
17
  import { withRouter } from 'next/router';
18
18
  import './isSymbol-c1b9be80.js';
19
19
  import { d as debounce_1 } from './debounce-8cd9e09c.js';
20
- import { I as InfiniteScroll } from './index.es-29c1cef5.js';
20
+ import { I as InfiniteScroll } from './index.es-938a3a58.js';
21
21
  import 'react-dom';
22
22
  import { V as VisibilitySensor } from './visibility-sensor-0baa4eea.js';
23
23
  import './index-51a80699.js';
package/dist/esm/View.js CHANGED
@@ -13,17 +13,17 @@ import './web.dom.iterable-46c95e52.js';
13
13
  import { _ as _typeof } from './typeof-5f046efd.js';
14
14
  import './_is-array-dd5523d6.js';
15
15
  import React__default, { useState, useEffect } from 'react';
16
- import { l as lib_3 } from './index-3f4dd6f2.js';
16
+ import { l as lib_3 } from './index-93ec3c59.js';
17
17
  import 'prop-types';
18
- import { m as moment } from './moment-49ae13fa.js';
18
+ import { m as moment } from './moment-12415288.js';
19
19
  import 'next/router';
20
20
  import './isSymbol-c1b9be80.js';
21
21
  import './debounce-8cd9e09c.js';
22
- import { I as InfiniteScroll } from './index.es-29c1cef5.js';
22
+ import { I as InfiniteScroll } from './index.es-938a3a58.js';
23
23
  import 'react-dom';
24
24
  import './index-51a80699.js';
25
25
  import './index-5f9f807a.js';
26
- import { m as main_36 } from './main-adf6ec37.js';
26
+ import { m as main_39 } from './main-7255814e.js';
27
27
  import './entities-7cc3bf45.js';
28
28
  import { a as _getIterator, _ as _slicedToArray } from './slicedToArray-f1e40361.js';
29
29
  import { _ as _JSON$stringify } from './stringify-e30bc114.js';
@@ -52,7 +52,7 @@ import './util-7700fc59.js';
52
52
  import 'react-bootstrap/Pagination';
53
53
  import 'next/dynamic';
54
54
  import getKeywords from './getKeywords.js';
55
- import { a as getContentPlacementUrl, g as getTargeting } from './getTargeting-8f4bd5db.js';
55
+ import { a as getContentPlacementUrl, g as getTargeting } from './getTargeting-1a0bd08d.js';
56
56
  import urlFor from './urlFor.js';
57
57
 
58
58
  var renderAuthor = function renderAuthor(authorName, authorURL, index, length) {
@@ -168,9 +168,9 @@ var DocumentGroup = function DocumentGroup(_ref) {
168
168
  style: { display: 'flex', flexDirection: 'column', padding: '0 1rem', justifyContent: thumbnailUrl ? 'center' : 'flex-start', alignItems: 'center' } },
169
169
  thumbnailUrl && React__default.createElement('img', { style: { maxWidth: '220px', maxHeight: '100px', marginTop: '1rem' }, src: thumbnailUrl, alt: name }),
170
170
  React__default.createElement('p', {
171
- style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main_36 ? 'left' : 'right', marginTop: '.25rem' },
171
+ style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main_39 ? 'left' : 'right', marginTop: '.25rem' },
172
172
  dangerouslySetInnerHTML: { __html: name } }),
173
- main_36 && !thumbnailUrl && React__default.createElement(
173
+ main_39 && !thumbnailUrl && React__default.createElement(
174
174
  'style',
175
175
  { jsx: 'true' },
176
176
  '\n a.doc-group {\n display: block !important;\n padding: 0!important;\n }\n '
@@ -497,7 +497,7 @@ var Article = function Article(props) {
497
497
  contextualAD: _extends({}, payload.contextualAD, {
498
498
  slotId: (payload.contextualAD.slotId || 'native-ad') + '-' + payload._id,
499
499
  // Fetching new contextual targeting based on the current active article.
500
- targeting: props.getTargeting(props.article, 'native-ad'),
500
+ targeting: getTargeting(props, 'native-ad'),
501
501
  // Adding new ad size for large contextual ad for desktop screen width >= 1400
502
502
  sizes: lgContextAd ? [[728, 90], 'fluid', [300, 100]] : ['fluid', [300, 100]],
503
503
  sizeMapping: lgContextAd ? [{
@@ -762,7 +762,7 @@ var Article = function Article(props) {
762
762
  React__default.createElement(
763
763
  'div',
764
764
  { className: 'ad-box', style: { textAlign: 'center' } },
765
- main_36 && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
765
+ main_39 && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
766
766
  if (index === 0) {
767
767
  return React__default.createElement(
768
768
  'div',
@@ -817,7 +817,7 @@ var Article = function Article(props) {
817
817
  renderIsiContent(props.article)
818
818
  )
819
819
  ),
820
- main_36 && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
820
+ main_39 && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
821
821
  if (index > 0) {
822
822
  return React__default.createElement(
823
823
  'div',
@@ -910,7 +910,7 @@ var ArticleQueue = function ArticleQueue(props) {
910
910
  setQueueData = _useState2[1];
911
911
 
912
912
  var refreshAD = function refreshAD(path) {
913
- if (!main_36) {
913
+ if (!main_39) {
914
914
  var activeArticle = queueData.find(function (item) {
915
915
  return item.url.current === path;
916
916
  });
@@ -1038,10 +1038,10 @@ var ArticleQueue = function ArticleQueue(props) {
1038
1038
  { dataLength: queueData.length, next: loadmore, scrollThreshold: '60%', hasMore: true, style: { overflow: 'hidden' } },
1039
1039
  queueData.map(function (article, index) {
1040
1040
  if (!checkSponseredArticle(article) && Ads.getVideoContextualAD) {
1041
- article.contextualVideoAD = Ads.getVideoContextualAD(getTargeting(props));
1041
+ article.contextualVideoAD = Ads.getVideoContextualAD(getTargeting(props, 'in-context_video'));
1042
1042
  }
1043
1043
  if (!checkSponseredArticle(article) && Ads.getNativeContextualAD) {
1044
- article.contextualAD = Ads.getNativeContextualAD(getTargeting(props));
1044
+ article.contextualAD = Ads.getNativeContextualAD(getTargeting(props, 'native-ad'));
1045
1045
  }
1046
1046
  return React__default.createElement(Article, _extends({
1047
1047
  key: index
@@ -4,7 +4,7 @@ import './core.get-iterator-method-f5c0d66a.js';
4
4
  import './web.dom.iterable-46c95e52.js';
5
5
  import React__default from 'react';
6
6
  import 'prop-types';
7
- import { m as moment } from './moment-49ae13fa.js';
7
+ import { m as moment } from './moment-12415288.js';
8
8
  import 'react-dom';
9
9
  import { i as imageUrlBuilder } from './index-51a80699.js';
10
10
  import { L as LazyLoad } from './index-5f9f807a.js';
@@ -14,10 +14,10 @@ import { L as LazyLoad } from './index-5f9f807a.js';
14
14
  import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
15
15
  import { s as smoothscroll, g as getYoutubeId } from './smoothscroll-4b699764.js';
16
16
 
17
- /*
18
- GROQ query -
19
- accepts an array of title, URL
20
- `https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
17
+ /*
18
+ GROQ query -
19
+ accepts an array of title, URL
20
+ `https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
21
21
  */
22
22
 
23
23
  var YoutubeGroup = function YoutubeGroup(props) {
@@ -1,5 +1,5 @@
1
1
  import './_commonjsHelpers-0c4b6f40.js';
2
- import { m as moment } from './moment-49ae13fa.js';
2
+ import { m as moment } from './moment-12415288.js';
3
3
 
4
4
  var getQuery = function getQuery(type) {
5
5
  var today = moment().utc().format();