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