@mjhls/mjh-framework 1.0.221 → 1.0.223

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 +174 -174
  2. package/dist/cjs/AdSlot-d87cef08.js +69 -0
  3. package/dist/cjs/DeckContent.js +116 -59
  4. package/dist/cjs/DeckQueue.js +3 -3
  5. package/dist/cjs/{Dfp-c4f1f12a.js → Dfp-8b6f25fe.js} +1 -1
  6. package/dist/cjs/{GridContent-089aa22c.js → GridContent-8b0ebfec.js} +26 -10
  7. package/dist/cjs/GridContent.js +5 -4
  8. package/dist/cjs/IssueContentDeck.js +1 -1
  9. package/dist/cjs/IssueDeck.js +1 -1
  10. package/dist/cjs/MasterDeck.js +11 -11
  11. package/dist/cjs/{Normal-47d9e184.js → Normal-78631b6e.js} +78 -93
  12. package/dist/cjs/PublicationDeck.js +1 -1
  13. package/dist/cjs/QueueDeckExpanded.js +6 -5
  14. package/dist/cjs/{TaxonomyCard-d97685e2.js → TaxonomyCard-f24d8ec9.js} +1 -1
  15. package/dist/cjs/TaxonomyCard.js +2 -2
  16. package/dist/cjs/TemplateNormal.js +3 -2
  17. package/dist/cjs/ThumbnailCard.js +1 -1
  18. package/dist/cjs/VideoSeriesListing.js +2 -2
  19. package/dist/cjs/{YoutubeGroup-ad994d02.js → YoutubeGroup-d2d9e57c.js} +4 -4
  20. package/dist/cjs/YoutubeGroup.js +1 -1
  21. package/dist/cjs/{index-a4c53ff4.js → index-eb596973.js} +18 -18
  22. package/dist/cjs/index.js +203 -182
  23. package/dist/cjs/{main-58839f4e.js → main-c1bd47fe.js} +6 -6
  24. package/dist/cjs/{visibility-sensor-bea3105d.js → visibility-sensor-59b2685c.js} +2501 -1437
  25. package/dist/esm/AdSlot-b67f8534.js +64 -0
  26. package/dist/esm/DeckContent.js +116 -59
  27. package/dist/esm/DeckQueue.js +3 -3
  28. package/dist/esm/{Dfp-6731ac01.js → Dfp-6c8d69e6.js} +1 -1
  29. package/dist/esm/{GridContent-214acb61.js → GridContent-0777cc42.js} +26 -10
  30. package/dist/esm/GridContent.js +5 -4
  31. package/dist/esm/IssueContentDeck.js +1 -1
  32. package/dist/esm/IssueDeck.js +1 -1
  33. package/dist/esm/MasterDeck.js +11 -11
  34. package/dist/esm/{Normal-be430fa9.js → Normal-7d33c7bf.js} +78 -92
  35. package/dist/esm/PublicationDeck.js +1 -1
  36. package/dist/esm/QueueDeckExpanded.js +6 -5
  37. package/dist/esm/{TaxonomyCard-f9c93953.js → TaxonomyCard-ca8c7c8a.js} +1 -1
  38. package/dist/esm/TaxonomyCard.js +2 -2
  39. package/dist/esm/TemplateNormal.js +3 -2
  40. package/dist/esm/ThumbnailCard.js +1 -1
  41. package/dist/esm/VideoSeriesListing.js +2 -2
  42. package/dist/esm/{YoutubeGroup-1368335c.js → YoutubeGroup-d3b92eb5.js} +4 -4
  43. package/dist/esm/YoutubeGroup.js +1 -1
  44. package/dist/esm/{index-ca4ff5cb.js → index-b7bbf1d4.js} +18 -18
  45. package/dist/esm/index.js +204 -183
  46. package/dist/esm/{main-dea495b7.js → main-2504c03f.js} +6 -6
  47. package/dist/esm/{visibility-sensor-675d3fa1.js → visibility-sensor-61158020.js} +2501 -1437
  48. package/package.json +93 -93
package/dist/cjs/index.js CHANGED
@@ -13,26 +13,27 @@ require('react-bootstrap/Container');
13
13
  require('react-bootstrap/Row');
14
14
  require('react-bootstrap/Col');
15
15
  require('react-bootstrap/Card');
16
- var visibilitySensor = require('./visibility-sensor-bea3105d.js');
16
+ var visibilitySensor = require('./visibility-sensor-59b2685c.js');
17
17
  var Link = _interopDefault(require('next/link'));
18
18
  var Router = require('next/router');
19
19
  var Router__default = _interopDefault(Router);
20
20
  require('./debounce-a963b136.js');
21
21
  require('react-dom');
22
- var index$1 = require('./index-a4c53ff4.js');
22
+ var index$1 = require('./index-eb596973.js');
23
23
  require('./index-0d0efcfa.js');
24
- var main = require('./main-58839f4e.js');
24
+ var main = require('./main-c1bd47fe.js');
25
25
  var entities = require('./entities-3e0b4a16.js');
26
26
  var _babelHelpers = require('./_babelHelpers-f321c258.js');
27
+ var AdSlot = require('./AdSlot-d87cef08.js');
27
28
  var DeckContent = require('./DeckContent.js');
28
29
  require('./get-126b1712.js');
29
- var GridContent = require('./GridContent-089aa22c.js');
30
+ var GridContent = require('./GridContent-8b0ebfec.js');
30
31
  var DeckQueue = require('./DeckQueue.js');
31
32
  require('react-bootstrap/Media');
32
33
  var ThumbnailCard = require('./ThumbnailCard.js');
33
- var TaxonomyCard = require('./TaxonomyCard-d97685e2.js');
34
+ var TaxonomyCard = require('./TaxonomyCard-f24d8ec9.js');
34
35
  var GroupDeck = require('./GroupDeck.js');
35
- var YoutubeGroup = require('./YoutubeGroup-ad994d02.js');
36
+ var YoutubeGroup = require('./YoutubeGroup-d2d9e57c.js');
36
37
  var reactBootstrap = require('react-bootstrap');
37
38
  var QueueDeckExpanded = require('./QueueDeckExpanded.js');
38
39
  var index_esm = require('./index.esm-340d3792.js');
@@ -43,7 +44,7 @@ var PublicationDeck = require('./PublicationDeck.js');
43
44
  var IssueDeck = require('./IssueDeck.js');
44
45
  require('react-bootstrap/Badge');
45
46
  var IssueContentDeck = require('./IssueContentDeck.js');
46
- var TemplateNormal = require('./Normal-47d9e184.js');
47
+ var TemplateNormal = require('./Normal-78631b6e.js');
47
48
  require('react-bootstrap/ListGroup');
48
49
  var Head = _interopDefault(require('next/head'));
49
50
  var Accordion = _interopDefault(require('react-bootstrap/Accordion'));
@@ -202,7 +203,7 @@ var AD300x250 = function AD300x250(_ref) {
202
203
  _ref$targeting = _ref.targeting,
203
204
  targeting = _ref$targeting === undefined ? {} : _ref$targeting;
204
205
 
205
- return React__default.createElement(TemplateNormal.DFPAdSlot, {
206
+ return React__default.createElement(AdSlot.DFPAdSlot, {
206
207
  networkID: networkID,
207
208
  adUnit: adUnit,
208
209
  slotId: slotId,
@@ -219,7 +220,7 @@ var AD300x250x600 = function AD300x250x600(_ref) {
219
220
  _ref$targeting = _ref.targeting,
220
221
  targeting = _ref$targeting === undefined ? {} : _ref$targeting;
221
222
 
222
- return React__default.createElement(TemplateNormal.DFPAdSlot, {
223
+ return React__default.createElement(AdSlot.DFPAdSlot, {
223
224
  networkID: networkID,
224
225
  adUnit: adUnit,
225
226
  className: 'AD300x250',
@@ -10491,7 +10492,7 @@ var NativeAd = function NativeAd(props) {
10491
10492
  return React__default.createElement(
10492
10493
  'div',
10493
10494
  { className: 'native-ad-wrapper', style: { textAlign: 'center' } },
10494
- React__default.createElement(GridContent.AD, { networkID: networkID, adUnit: adUnit, slotId: slotId, targeting: targeting, className: className, sizes: sizes, sizeMapping: sizeMapping })
10495
+ React__default.createElement(AdSlot.DFPAdSlot, { networkID: networkID, adUnit: adUnit, slotId: slotId, targeting: targeting, className: className, sizes: sizes, sizeMapping: sizeMapping })
10495
10496
  );
10496
10497
  };
10497
10498
 
@@ -11202,16 +11203,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
11202
11203
  _ref$className = _ref.className,
11203
11204
  className = _ref$className === undefined ? '' : _ref$className;
11204
11205
 
11205
- /*
11206
- Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
11207
- example:
11208
- <RelatedTopicDropdown
11209
- page='/clinical'
11210
- exclude="clinical"
11211
- className='mb-3'
11212
- parentTaxonomy={props.parentTaxonomy}
11213
- subTaxonomies={props.subTaxonomies}
11214
- />
11206
+ /*
11207
+ Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
11208
+ example:
11209
+ <RelatedTopicDropdown
11210
+ page='/clinical'
11211
+ exclude="clinical"
11212
+ className='mb-3'
11213
+ parentTaxonomy={props.parentTaxonomy}
11214
+ subTaxonomies={props.subTaxonomies}
11215
+ />
11215
11216
  */
11216
11217
  if (subTaxonomies.length === 0 && parentTaxonomy) {
11217
11218
  if (parentTaxonomy.identifier == exclude) {
@@ -11249,19 +11250,19 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
11249
11250
  }
11250
11251
  };
11251
11252
 
11252
- /*
11253
- This dropdown is used inside Article body to display related content placement pages
11254
- sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
11255
-
11256
- in article query, need to add '...' to content_placement to retreive additional info needed
11257
-
11258
- 'content_placement': taxonomyMapping[]-> {
11259
- ...,
11260
- 'ancestor': parent->parent->identifier,
11261
- 'parent': parent->identifier,
11262
- 'path': identifier
11263
- }
11264
-
11253
+ /*
11254
+ This dropdown is used inside Article body to display related content placement pages
11255
+ sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
11256
+
11257
+ in article query, need to add '...' to content_placement to retreive additional info needed
11258
+
11259
+ 'content_placement': taxonomyMapping[]-> {
11260
+ ...,
11261
+ 'ancestor': parent->parent->identifier,
11262
+ 'parent': parent->identifier,
11263
+ 'path': identifier
11264
+ }
11265
+
11265
11266
  */
11266
11267
 
11267
11268
  var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
@@ -11932,34 +11933,34 @@ var YahooHero = function YahooHero(props) {
11932
11933
  );
11933
11934
  };
11934
11935
 
11935
- /*
11936
- Sample query
11937
- let references = ''
11938
- if(article.taxonomyMapping.length > 0){
11939
- article.taxonomyMapping.forEach((ref, index) => {
11940
- references = references + `references('${ref._ref}') `
11941
- if(index+1 !== article.taxonomyMapping.length){
11942
- references = references + ` && `
11943
- }
11944
- })
11945
- }
11946
-
11947
- 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] {
11948
- ...,
11949
- title,
11950
- summary,
11951
- thumbnail,
11952
- url,
11953
- published,
11954
- authorMapping[]->,
11955
- contentCategory->
11956
- }`
11957
- const relatedArticles = await client.fetch(relatedArticlesQuery)
11958
-
11959
- Sample usage
11960
- <RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
11961
-
11962
-
11936
+ /*
11937
+ Sample query
11938
+ let references = ''
11939
+ if(article.taxonomyMapping.length > 0){
11940
+ article.taxonomyMapping.forEach((ref, index) => {
11941
+ references = references + `references('${ref._ref}') `
11942
+ if(index+1 !== article.taxonomyMapping.length){
11943
+ references = references + ` && `
11944
+ }
11945
+ })
11946
+ }
11947
+
11948
+ 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] {
11949
+ ...,
11950
+ title,
11951
+ summary,
11952
+ thumbnail,
11953
+ url,
11954
+ published,
11955
+ authorMapping[]->,
11956
+ contentCategory->
11957
+ }`
11958
+ const relatedArticles = await client.fetch(relatedArticlesQuery)
11959
+
11960
+ Sample usage
11961
+ <RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
11962
+
11963
+
11963
11964
  */
11964
11965
  var RelatedContent = function RelatedContent(props) {
11965
11966
  var client = props.client,
@@ -12026,21 +12027,21 @@ var RelatedContent = function RelatedContent(props) {
12026
12027
  );
12027
12028
  };
12028
12029
 
12029
- /*
12030
- Example usage - targetedonc.com/latest-conference
12031
- const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
12032
- ...,
12033
- title,
12034
- summary,
12035
- thumbnail,
12036
- url,
12037
- published,
12038
- documentGroup->,
12039
- contentCategory->,
12040
- 'pageNumber': ${currentPage}
12041
- }`
12042
-
12043
- const posts = await client.fetch(query, params)
12030
+ /*
12031
+ Example usage - targetedonc.com/latest-conference
12032
+ const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
12033
+ ...,
12034
+ title,
12035
+ summary,
12036
+ thumbnail,
12037
+ url,
12038
+ published,
12039
+ documentGroup->,
12040
+ contentCategory->,
12041
+ 'pageNumber': ${currentPage}
12042
+ }`
12043
+
12044
+ const posts = await client.fetch(query, params)
12044
12045
  */
12045
12046
 
12046
12047
  var ConferenceArticleCard = function ConferenceArticleCard(props) {
@@ -12235,84 +12236,97 @@ var Article = function Article(props) {
12235
12236
 
12236
12237
  var siteName = props.website.title;
12237
12238
  return React__default.createElement(
12238
- InscreenSensor,
12239
- {
12240
- offSetTop: 45,
12241
- onChange: function onChange(visible) {
12242
- if (visible !== false) {
12243
- changeUrl(url, visible);
12244
- }
12245
- } },
12239
+ React__default.Fragment,
12240
+ null,
12246
12241
  React__default.createElement(
12247
- 'div',
12248
- null,
12249
- React__default.createElement(
12250
- Head,
12251
- null,
12252
- passwordLock && React__default.createElement('meta', { name: 'robots', content: 'noindex, nofollow' })
12253
- ),
12254
- React__default.createElement(
12255
- 'h1',
12256
- { className: 'page-title' },
12257
- title
12258
- ),
12242
+ InscreenSensor,
12243
+ {
12244
+ offSetTop: 45,
12245
+ onChange: function onChange(visible) {
12246
+ if (visible !== false) {
12247
+ changeUrl(url, visible);
12248
+ }
12249
+ } },
12259
12250
  React__default.createElement(
12260
12251
  'div',
12261
- { className: 'video-detail', style: { marginBottom: isCutomPage(props.article) ? '150px' : 0 } },
12252
+ null,
12262
12253
  React__default.createElement(
12263
- 'div',
12254
+ Head,
12264
12255
  null,
12265
- visibilitySensor.moment(published).format('LL')
12256
+ passwordLock && React__default.createElement('meta', { name: 'robots', content: 'noindex, nofollow' })
12266
12257
  ),
12267
12258
  React__default.createElement(
12268
- 'div',
12269
- { className: 'mb-3' },
12270
- authorDetails && authorDetails.map(function (authorDetail, index) {
12271
- return React__default.createElement(
12272
- 'div',
12273
- { key: index },
12274
- renderAuthor(authorDetail.displayName, authorDetail.url, index, authorDetails.length)
12275
- );
12276
- })
12259
+ 'h1',
12260
+ { className: 'page-title' },
12261
+ title
12277
12262
  ),
12278
12263
  React__default.createElement(
12279
- 'p',
12280
- null,
12281
- React__default.createElement(SocialShare$1, {
12282
- shareUrl: shareUrl,
12283
- shareTitle: shareTitle,
12284
- shareVia: shareVia,
12285
- shareSummary: shareSummary,
12286
- shareSubject: shareSubject,
12287
- shareImage: shareImage,
12288
- size: 32,
12289
- siteName: siteName,
12290
- twitterSiteName: twitterSiteName
12291
- })
12292
- ),
12293
- React__default.createElement(
12294
- 'p',
12295
- null,
12264
+ 'div',
12265
+ { className: 'video-detail', style: { marginBottom: isCutomPage(props.article) ? '150px' : 0 } },
12296
12266
  React__default.createElement(
12297
- 'em',
12267
+ 'div',
12298
12268
  null,
12299
- summary
12269
+ visibilitySensor.moment(published).format('LL')
12300
12270
  ),
12301
- React__default.createElement('br', null),
12302
- React__default.createElement('br', null)
12271
+ React__default.createElement(
12272
+ 'div',
12273
+ { className: 'mb-3' },
12274
+ authorDetails && authorDetails.map(function (authorDetail, index) {
12275
+ return React__default.createElement(
12276
+ 'div',
12277
+ { key: index },
12278
+ renderAuthor(authorDetail.displayName, authorDetail.url, index, authorDetails.length)
12279
+ );
12280
+ })
12281
+ ),
12282
+ React__default.createElement(
12283
+ 'p',
12284
+ null,
12285
+ React__default.createElement(SocialShare$1, {
12286
+ shareUrl: shareUrl,
12287
+ shareTitle: shareTitle,
12288
+ shareVia: shareVia,
12289
+ shareSummary: shareSummary,
12290
+ shareSubject: shareSubject,
12291
+ shareImage: shareImage,
12292
+ size: 32,
12293
+ siteName: siteName,
12294
+ twitterSiteName: twitterSiteName
12295
+ })
12296
+ ),
12297
+ React__default.createElement(
12298
+ 'p',
12299
+ null,
12300
+ React__default.createElement(
12301
+ 'em',
12302
+ null,
12303
+ summary
12304
+ ),
12305
+ React__default.createElement('br', null),
12306
+ React__default.createElement('br', null)
12307
+ ),
12308
+ React__default.createElement(
12309
+ 'div',
12310
+ { className: 'block-content' },
12311
+ React__default.createElement(TaxonomyCard.BlockContent, _babelHelpers._extends({
12312
+ serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true),
12313
+ blocks: articleBody,
12314
+ imageOptions: { w: 320, h: 240, fit: 'max' }
12315
+ }, client.config()))
12316
+ )
12303
12317
  ),
12304
- React__default.createElement(
12305
- 'div',
12306
- { className: 'block-content' },
12307
- React__default.createElement(TaxonomyCard.BlockContent, _babelHelpers._extends({
12308
- serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true),
12309
- blocks: articleBody,
12310
- imageOptions: { w: 320, h: 240, fit: 'max' }
12311
- }, client.config()))
12312
- )
12313
- ),
12314
- renderIsiContent(props.article)
12315
- )
12318
+ renderIsiContent(props.article)
12319
+ )
12320
+ ),
12321
+ main.main_36 && React__default.createElement('hr', { className: 'add-seperater' }),
12322
+ main.main_36 && props.article.Ads.map(function (ad, index) {
12323
+ return React__default.createElement(
12324
+ 'div',
12325
+ { key: index, id: 'addid-' + index, style: { display: 'flex', flex: '1 0 auto' } },
12326
+ ad.component
12327
+ );
12328
+ }),
12329
+ React__default.createElement('hr', { className: 'article-seperater' })
12316
12330
  );
12317
12331
  };
12318
12332
 
@@ -12336,6 +12350,8 @@ var ArticleQueue = function (_React$Component) {
12336
12350
 
12337
12351
  var targeting = _this.getTargeting(_this.props.article);
12338
12352
  var metaDescription = description ? description : summary ? summary : _this.getFirstLine(_this.props.article);
12353
+ var article = _this.props.article;
12354
+ article.Ads = _this.props.Ads.getRightItems(targeting);
12339
12355
 
12340
12356
  _this.state = {
12341
12357
  config: {
@@ -12349,7 +12365,7 @@ var ArticleQueue = function (_React$Component) {
12349
12365
  },
12350
12366
  title: _this.props.article.title,
12351
12367
  summary: metaDescription,
12352
- queueData: [_this.props.article],
12368
+ queueData: [article],
12353
12369
  relatedArticles: [],
12354
12370
  keywords: []
12355
12371
  }, _this.preVscroll = 0;
@@ -12366,9 +12382,14 @@ var ArticleQueue = function (_React$Component) {
12366
12382
  }, {
12367
12383
  key: 'componentDidUpdate',
12368
12384
  value: function componentDidUpdate(prevProps) {
12369
- if (prevProps.relatedArticles != this.props.relatedArticles) {
12370
- var relatedArticles = this.props.relatedArticles;
12385
+ var _this2 = this;
12371
12386
 
12387
+ if (prevProps.relatedArticles != this.props.relatedArticles) {
12388
+ var relatedArticles = this.props.relatedArticles.map(function (article) {
12389
+ var targeting = _this2.getTargeting(_this2.props.article);
12390
+ var Ads = _this2.props.Ads.getRightItems(targeting);
12391
+ return _babelHelpers._extends({}, article, { Ads: Ads });
12392
+ });
12372
12393
  var queueData = [].concat(_babelHelpers.toConsumableArray(this.state.queueData));
12373
12394
  if (prevProps.relatedArticles.length == 0) {
12374
12395
  queueData.push(relatedArticles.shift());
@@ -12387,7 +12408,7 @@ var ArticleQueue = function (_React$Component) {
12387
12408
  }, {
12388
12409
  key: 'render',
12389
12410
  value: function render() {
12390
- var _this2 = this;
12411
+ var _this3 = this;
12391
12412
 
12392
12413
  var _state = this.state,
12393
12414
  config = _state.config,
@@ -12403,19 +12424,19 @@ var ArticleQueue = function (_React$Component) {
12403
12424
 
12404
12425
  return React__default.createElement(
12405
12426
  TemplateNormal.TemplateNormal,
12406
- { config: config, website: website, keywords: keywords, description: summary, title: title, showRightAd: true },
12427
+ { config: config, website: website, keywords: keywords, description: summary, title: title, showRightAd: !main.main_36 },
12407
12428
  React__default.createElement(
12408
12429
  visibilitySensor.InfiniteScroll,
12409
12430
  { dataLength: queueData.length, next: this.loadmore, scrollThreshold: '200px', hasMore: true },
12410
12431
  queueData.map(function (article, index) {
12411
12432
  return React__default.createElement(Article, _babelHelpers._extends({
12412
12433
  key: index,
12413
- urlFor: _this2.urlFor,
12414
- isCutomPage: _this2.isCutomPage,
12415
- renderIsiContent: _this2.renderIsiContent
12416
- }, _this2.props, {
12434
+ urlFor: _this3.urlFor,
12435
+ isCutomPage: _this3.isCutomPage,
12436
+ renderIsiContent: _this3.renderIsiContent
12437
+ }, _this3.props, {
12417
12438
  shareOptions: shareOptions,
12418
- changeUrl: _this2.changeUrl,
12439
+ changeUrl: _this3.changeUrl,
12419
12440
  article: article
12420
12441
  }));
12421
12442
  })
@@ -12427,37 +12448,37 @@ var ArticleQueue = function (_React$Component) {
12427
12448
  }(React__default.Component);
12428
12449
 
12429
12450
  var _initialiseProps = function _initialiseProps() {
12430
- var _this3 = this;
12451
+ var _this4 = this;
12431
12452
 
12432
12453
  this.scrollDirectionDetect = function (e) {
12433
12454
  var window = e.currentTarget;
12434
- var isScrollDown = _this3.isScrollDown;
12455
+ var isScrollDown = _this4.isScrollDown;
12435
12456
 
12436
12457
 
12437
- if (_this3.preVscroll > window.scrollY) {
12458
+ if (_this4.preVscroll > window.scrollY) {
12438
12459
  if (!isScrollDown) {
12439
- _this3.isScrollDown = true;
12460
+ _this4.isScrollDown = true;
12440
12461
  }
12441
- } else if (_this3.preVscroll < window.scrollY) {
12462
+ } else if (_this4.preVscroll < window.scrollY) {
12442
12463
  if (isScrollDown) {
12443
- _this3.isScrollDown = false;
12464
+ _this4.isScrollDown = false;
12444
12465
  }
12445
12466
  }
12446
- _this3.preVscroll = window.scrollY;
12467
+ _this4.preVscroll = window.scrollY;
12447
12468
  };
12448
12469
 
12449
12470
  this.loadmore = function () {
12450
- var queueData = [].concat(_babelHelpers.toConsumableArray(_this3.state.queueData));
12451
- var relatedArticles = [].concat(_babelHelpers.toConsumableArray(_this3.state.relatedArticles));
12471
+ var queueData = [].concat(_babelHelpers.toConsumableArray(_this4.state.queueData));
12472
+ var relatedArticles = [].concat(_babelHelpers.toConsumableArray(_this4.state.relatedArticles));
12452
12473
  if (relatedArticles.length > 0) {
12453
12474
  queueData.push(relatedArticles.shift());
12454
- _this3.setState({ queueData: queueData, relatedArticles: relatedArticles });
12475
+ _this4.setState({ queueData: queueData, relatedArticles: relatedArticles });
12455
12476
  }
12456
12477
  };
12457
12478
 
12458
12479
  this.isCutomPage = function (article) {
12459
12480
  var url = article.url.current;
12460
- var _props2 = _this3.props,
12481
+ var _props2 = _this4.props,
12461
12482
  regionalPages = _props2.regionalPages,
12462
12483
  nationalPage = _props2.nationalPage;
12463
12484
 
@@ -12465,7 +12486,7 @@ var _initialiseProps = function _initialiseProps() {
12465
12486
  };
12466
12487
 
12467
12488
  this.urlFor = function (source) {
12468
- return index$1.imageUrlBuilder(_this3.props.client).image(source);
12489
+ return index$1.imageUrlBuilder(_this4.props.client).image(source);
12469
12490
  };
12470
12491
 
12471
12492
  this.getTargeting = function (article) {
@@ -12490,7 +12511,7 @@ var _initialiseProps = function _initialiseProps() {
12490
12511
  content_placement = article.content_placement;
12491
12512
 
12492
12513
  var context = url;
12493
- var localHistory = _this3.props.historyCookie ? JSON.parse(_this3.props.historyCookie) : [];
12514
+ var localHistory = _this4.props.historyCookie ? JSON.parse(_this4.props.historyCookie) : [];
12494
12515
  if (!context && localHistory) {
12495
12516
  context = localHistory[localHistory.length - 1];
12496
12517
  }
@@ -12529,7 +12550,7 @@ var _initialiseProps = function _initialiseProps() {
12529
12550
  var _article$taxonomyMapp = article.taxonomyMapping,
12530
12551
  taxonomyMapping = _article$taxonomyMapp === undefined ? [] : _article$taxonomyMapp;
12531
12552
 
12532
- if (_this3.props.checkSponsered) {
12553
+ if (_this4.props.checkSponsered) {
12533
12554
 
12534
12555
  return taxonomyMapping.some(function (item) {
12535
12556
  return item._ref === 'ict_taxonomy_735_sponsoredresources';
@@ -12541,7 +12562,7 @@ var _initialiseProps = function _initialiseProps() {
12541
12562
 
12542
12563
  this.renderIsiContent = function (article) {
12543
12564
  var url = article.url.current;
12544
- var _props3 = _this3.props,
12565
+ var _props3 = _this4.props,
12545
12566
  ISIContent = _props3.iSIContent,
12546
12567
  regionalPages = _props3.regionalPages,
12547
12568
  nationalPage = _props3.nationalPage;
@@ -12575,7 +12596,7 @@ var _initialiseProps = function _initialiseProps() {
12575
12596
  };
12576
12597
 
12577
12598
  this.refreshAdd = function (path) {
12578
- var article = _this3.state.queueData.find(function (item) {
12599
+ var article = _this4.state.queueData.find(function (item) {
12579
12600
  return item.url.current == path;
12580
12601
  });
12581
12602
  var title = article.title,
@@ -12595,52 +12616,53 @@ var _initialiseProps = function _initialiseProps() {
12595
12616
  var description = _article$seo.meta_description;
12596
12617
 
12597
12618
  var keywords = [].concat(_babelHelpers.toConsumableArray(internalTag), _babelHelpers.toConsumableArray(userDefinedTag), _babelHelpers.toConsumableArray(SponsorshipTag), _babelHelpers.toConsumableArray(seoTag));
12598
- var config = _babelHelpers._extends({}, _this3.state.config);
12599
- var targeting = _this3.getTargeting(article);
12619
+ var config = _babelHelpers._extends({}, _this4.state.config);
12620
+ var targeting = _this4.getTargeting(article);
12600
12621
  var rightItems = [];
12601
12622
 
12602
- if (_this3.checkSponseredArticle(article)) {
12623
+ if (_this4.checkSponseredArticle(article)) {
12603
12624
  rightItems = [];
12604
12625
  } else {
12605
- rightItems = _this3.props.Ads.getRightItems(targeting);
12626
+ rightItems = _this4.props.Ads.getRightItems(targeting);
12606
12627
  }
12607
- var horizontalAD = _this3.props.Ads.getHorizontal(targeting);
12628
+ var horizontalAD = _this4.props.Ads.getHorizontal(targeting);
12608
12629
  config.rightItems = rightItems;
12609
12630
  config.horizontalAD = horizontalAD;
12610
- var metaDescription = description ? description : summary ? summary : _this3.getFirstLine(article);
12611
- _this3.setState({ config: config, title: title, summary: metaDescription }, function () {
12631
+ var metaDescription = description ? description : summary ? summary : _this4.getFirstLine(article);
12632
+ _this4.setState({ config: config, title: title, summary: metaDescription }, function () {
12612
12633
  index.lib_3.refresh();
12613
12634
  });
12614
12635
  };
12615
12636
 
12616
12637
  this.changeUrl = function (path, visibility) {
12617
- var isScrollDown = _this3.isScrollDown;
12638
+ var isScrollDown = _this4.isScrollDown;
12618
12639
 
12619
12640
  var newPath = '/view/' + path;
12620
12641
  if (!isScrollDown) {
12621
12642
  if (visibility == 'top') {
12622
12643
  // Router.push('/view/[url]', newPath, {shallow:true})
12623
12644
  window.history.pushState({ page: path }, path, newPath);
12624
- if (_this3.props.pageview) {
12625
- _this3.props.pageview(newPath);
12645
+ if (_this4.props.pageview) {
12646
+ _this4.props.pageview(newPath);
12626
12647
  }
12627
12648
 
12628
- _this3.refreshAdd(path);
12649
+ _this4.refreshAdd(path);
12629
12650
  }
12630
12651
  } else {
12631
12652
  if (visibility == 'bottom') {
12632
12653
  // Router.push('/view/[url]', newPath, {shallow:true})
12633
12654
  window.history.pushState({ page: path }, path, newPath);
12634
- if (_this3.props.pageview) {
12635
- _this3.props.pageview(newPath);
12655
+ if (_this4.props.pageview) {
12656
+ _this4.props.pageview(newPath);
12636
12657
  }
12637
12658
 
12638
- _this3.refreshAdd(path);
12659
+ _this4.refreshAdd(path);
12639
12660
  }
12640
12661
  }
12641
12662
  };
12642
12663
  };
12643
12664
 
12665
+ exports.AdSlot = AdSlot.DFPAdSlot;
12644
12666
  exports.DeckContent = DeckContent;
12645
12667
  exports.AD = GridContent.AD;
12646
12668
  exports.GridContent = GridContent.GridContent;
@@ -12656,7 +12678,6 @@ exports.PublicationDeck = PublicationDeck;
12656
12678
  exports.IssueDeck = IssueDeck;
12657
12679
  exports.IssueContentDeck = IssueContentDeck;
12658
12680
  exports.AD728x90 = TemplateNormal.AD728x90;
12659
- exports.AdSlot = TemplateNormal.DFPAdSlot;
12660
12681
  exports.Column1 = TemplateNormal.Column1;
12661
12682
  exports.Column2 = TemplateNormal.Column2;
12662
12683
  exports.Column3 = TemplateNormal.Column3;
@@ -53,7 +53,7 @@ var getNavigatorInstance = function getNavigatorInstance() {
53
53
  };
54
54
  var isIOS13Check = function isIOS13Check(type) {
55
55
  var nav = getNavigatorInstance();
56
- return nav && (nav.platform.includes(type) || nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream);
56
+ return nav && (nav.platform.indexOf(type) !== -1 || nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream);
57
57
  };
58
58
 
59
59
  function _typeof(obj) {
@@ -449,7 +449,7 @@ var isIEType = function isIEType() {
449
449
  var isElectronType = function isElectronType() {
450
450
  var nav = getNavigatorInstance();
451
451
  var ua = nav && nav.userAgent.toLowerCase();
452
- return typeof ua === 'string' ? ua.includes('electron') : false;
452
+ return typeof ua === 'string' ? /electron/.test(ua) : false;
453
453
  };
454
454
 
455
455
  var getIOS13 = function getIOS13() {
@@ -516,15 +516,15 @@ var getDeviceType = function getDeviceType() {
516
516
  var isSmartTV = isSmartTVType();
517
517
  var isConsole = isConsoleType();
518
518
  var isWearable = isWearableType();
519
- var isMobileSafari = isMobileSafariType();
519
+ var isMobileSafari = isMobileSafariType() || getIPad13();
520
520
  var isChromium = isChromiumType();
521
- var isMobile = isMobileAndTabletType();
521
+ var isMobile = isMobileAndTabletType() || getIPad13();
522
522
  var isMobileOnly = isMobileType();
523
- var isTablet = isTabletType();
523
+ var isTablet = isTabletType() || getIPad13();
524
524
  var isBrowser = isBrowserType();
525
525
  var isAndroid = isAndroidType();
526
526
  var isWinPhone = isWinPhoneType();
527
- var isIOS = isIOSType();
527
+ var isIOS = isIOSType() || getIPad13();
528
528
  var isChrome = isChromeType();
529
529
  var isFirefox = isFirefoxType();
530
530
  var isSafari = isSafariType();