@mjhls/mjh-framework 1.0.966-testV7 → 1.0.967-socialicon-fix
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 +1 -1
- package/dist/cjs/AlgoliaSearch.js +0 -2
- package/dist/cjs/ArticleProgramLandingPage.js +1 -1
- package/dist/cjs/ExternalResources.js +1 -1
- package/dist/cjs/HorizontalArticleListing.js +1 -1
- package/dist/cjs/IssueLanding.js +1 -1
- package/dist/cjs/{MediaSeriesCard-94ff4d11.js → MediaSeriesCard-200d270d.js} +1 -1
- package/dist/cjs/MediaSeriesLanding.js +3 -3
- package/dist/cjs/MediaSeriesLandingPaginated.js +3 -3
- package/dist/cjs/PartnerDetailListing.js +3 -3
- package/dist/cjs/PartnerDetailListingPaginated.js +3 -3
- package/dist/cjs/TaxonomyDescription.js +2 -2
- package/dist/cjs/VideoProgramLandingPage.js +1 -1
- package/dist/cjs/View.js +11 -26
- package/dist/cjs/getQuery.js +2 -2
- package/dist/cjs/getSerializers.js +1 -1
- package/dist/cjs/{index-eb1c583d.js → index-6bab3b25.js} +1 -11
- package/dist/cjs/index.js +1 -4
- package/dist/esm/AlgoliaSearch.js +0 -2
- package/dist/esm/ArticleProgramLandingPage.js +1 -1
- package/dist/esm/ExternalResources.js +1 -1
- package/dist/esm/HorizontalArticleListing.js +1 -1
- package/dist/esm/IssueLanding.js +1 -1
- package/dist/esm/{MediaSeriesCard-4f07fac6.js → MediaSeriesCard-0f93cf68.js} +1 -1
- package/dist/esm/MediaSeriesLanding.js +3 -3
- package/dist/esm/MediaSeriesLandingPaginated.js +3 -3
- package/dist/esm/PartnerDetailListing.js +3 -3
- package/dist/esm/PartnerDetailListingPaginated.js +3 -3
- package/dist/esm/TaxonomyDescription.js +2 -2
- package/dist/esm/VideoProgramLandingPage.js +1 -1
- package/dist/esm/View.js +11 -26
- package/dist/esm/getQuery.js +2 -2
- package/dist/esm/getSerializers.js +1 -1
- package/dist/esm/{index-264bbd3c.js → index-0074586c.js} +1 -11
- package/dist/esm/index.js +1 -2
- package/package.json +1 -1
- package/dist/cjs/PixelTracking.js +0 -165
- package/dist/esm/PixelTracking.js +0 -156
|
@@ -11,7 +11,7 @@ import QueueDeckExpanded from './QueueDeckExpanded.js';
|
|
|
11
11
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
12
12
|
import Feature from './Feature.js';
|
|
13
13
|
import urlFor from './urlFor.js';
|
|
14
|
-
import { g as getSerializers } from './index-
|
|
14
|
+
import { g as getSerializers } from './index-0074586c.js';
|
|
15
15
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
16
16
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
17
17
|
import './core.get-iterator-method-ea258bb1.js';
|
|
@@ -263,14 +263,14 @@ PartnerDetails.returnGetInitialProps = function () {
|
|
|
263
263
|
case 0:
|
|
264
264
|
today = moment().utc().format();
|
|
265
265
|
featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + (category ? category + '/' : null) + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->\n }';
|
|
266
|
-
partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n
|
|
266
|
+
partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n description,\n name,\n identifier,\n thumbnail{ ..., asset-> },\n twitter,\n facebook,\n linkedin,\n instagram,\n twitterIcon,\n youtube,\n youtubeIcon,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n }';
|
|
267
267
|
|
|
268
268
|
|
|
269
269
|
if (category) {
|
|
270
270
|
// if partners page has a sub category such as onclive
|
|
271
271
|
// e.g. /sap-partner/[category]/[partner]
|
|
272
272
|
|
|
273
|
-
partnerQuery = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')] [0] {\n ...,\n \'partner\': *[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\' && references(^._id)] [0] {\n
|
|
273
|
+
partnerQuery = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')] [0] {\n ...,\n \'partner\': *[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\' && references(^._id)] [0] {\n description,\n name,\n identifier,\n thumbnail{ ..., asset-> },\n twitter,\n facebook,\n linkedin,\n twitterIcon,\n youtube,\n youtubeIcon,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n \n }\n }';
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
taxonomyQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && isShow != false\n && identifier.current == \'' + identifier + '\'] [0] {\n \'id\': _id,\n \'title\': name\n }';
|
|
@@ -11,7 +11,7 @@ import QueueDeckExpanded from './QueueDeckExpandedPaginated.js';
|
|
|
11
11
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
12
12
|
import Feature from './Feature.js';
|
|
13
13
|
import urlFor from './urlFor.js';
|
|
14
|
-
import { g as getSerializers } from './index-
|
|
14
|
+
import { g as getSerializers } from './index-0074586c.js';
|
|
15
15
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
16
16
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
17
17
|
import './core.get-iterator-method-ea258bb1.js';
|
|
@@ -239,14 +239,14 @@ PartnerDetails.returnGetInitialProps = function () {
|
|
|
239
239
|
switch (_context.prev = _context.next) {
|
|
240
240
|
case 0:
|
|
241
241
|
featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + (category ? category + '/' : null) + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->\n }';
|
|
242
|
-
partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n
|
|
242
|
+
partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n description,\n name,\n identifier,\n thumbnail{ ..., asset-> },\n twitter,\n facebook,\n linkedin,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n }';
|
|
243
243
|
|
|
244
244
|
|
|
245
245
|
if (category) {
|
|
246
246
|
// if partners page has a sub category such as onclive
|
|
247
247
|
// e.g. /sap-partner/[category]/[partner]
|
|
248
248
|
|
|
249
|
-
partnerQuery = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')] [0] {\n ...,\n \'partner\': *[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\' && references(^._id)] [0] {\n
|
|
249
|
+
partnerQuery = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')] [0] {\n ...,\n \'partner\': *[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\' && references(^._id)] [0] {\n description,\n name,\n identifier,\n thumbnail{ ..., asset-> },\n twitter,\n facebook,\n linkedin,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n \n }\n }';
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
taxonomyQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && isShow != false\n && identifier.current == \'' + identifier + '\'] [0] {\n \'id\': _id,\n \'title\': name\n }';
|
|
@@ -5,7 +5,7 @@ import React__default, { useState, useEffect } from 'react';
|
|
|
5
5
|
import { useRouter } from 'next/router';
|
|
6
6
|
import Head from 'next/head';
|
|
7
7
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
8
|
-
import { g as getSerializers } from './index-
|
|
8
|
+
import { g as getSerializers } from './index-0074586c.js';
|
|
9
9
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
10
10
|
import './core.get-iterator-method-ea258bb1.js';
|
|
11
11
|
import './_object-pie-133f504a.js';
|
|
@@ -160,7 +160,7 @@ TaxonomyDescription.getDescription = function () {
|
|
|
160
160
|
while (1) {
|
|
161
161
|
switch (_context2.prev = _context2.next) {
|
|
162
162
|
case 0:
|
|
163
|
-
query = '*[_type == \'taxonomy\' && identifier == \'' + url + '\'][0]
|
|
163
|
+
query = '*[_type == \'taxonomy\' && identifier == \'' + url + '\'][0].summary';
|
|
164
164
|
summary = [];
|
|
165
165
|
_context2.prev = 2;
|
|
166
166
|
_context2.next = 5;
|
|
@@ -5,7 +5,7 @@ import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
|
5
5
|
import Col from 'react-bootstrap/Col';
|
|
6
6
|
import Form from 'react-bootstrap/Form';
|
|
7
7
|
import Button from 'react-bootstrap/Button';
|
|
8
|
-
import { g as getSerializers } from './index-
|
|
8
|
+
import { g as getSerializers } from './index-0074586c.js';
|
|
9
9
|
import VideoSeriesListing from './VideoSeriesListing.js';
|
|
10
10
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
11
11
|
import './core.get-iterator-method-ea258bb1.js';
|
package/dist/esm/View.js
CHANGED
|
@@ -15,7 +15,7 @@ import FormControl from 'react-bootstrap/FormControl';
|
|
|
15
15
|
import Button from 'react-bootstrap/Button';
|
|
16
16
|
import { V as VisibilitySensor } from './visibility-sensor-72fd8f8b.js';
|
|
17
17
|
import SocialShare from './SocialShare.js';
|
|
18
|
-
import { r as renderAuthor, g as getSerializers } from './index-
|
|
18
|
+
import { r as renderAuthor, g as getSerializers } from './index-0074586c.js';
|
|
19
19
|
import DFPAdSlot from './AdSlot.js';
|
|
20
20
|
import { S as SeriesSlider } from './SeriesSlider-f771e20d.js';
|
|
21
21
|
import { a as getContentPlacementUrl, g as getTargeting } from './getTargeting-42f9b439.js';
|
|
@@ -29,7 +29,6 @@ import './index-755f2cc2.js';
|
|
|
29
29
|
import { DiscussionEmbed } from 'disqus-react';
|
|
30
30
|
import Schema from './Schema.js';
|
|
31
31
|
import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
|
|
32
|
-
import { PixelTrackingArticle } from './PixelTracking.js';
|
|
33
32
|
import { _ as _Object$keys } from './keys-31dcdb31.js';
|
|
34
33
|
import { I as InfiniteScroll } from './index.es-a6137319.js';
|
|
35
34
|
import { l as lib_3 } from './index-f0fc23eb.js';
|
|
@@ -667,7 +666,7 @@ var Recommended = function Recommended(props) {
|
|
|
667
666
|
|
|
668
667
|
return React__default.createElement(
|
|
669
668
|
'div',
|
|
670
|
-
{ id: 'recommended'
|
|
669
|
+
{ id: 'recommended' },
|
|
671
670
|
loaded === 'loaded' && React__default.createElement(
|
|
672
671
|
React__default.Fragment,
|
|
673
672
|
null,
|
|
@@ -1200,7 +1199,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1200
1199
|
return null;
|
|
1201
1200
|
};
|
|
1202
1201
|
|
|
1203
|
-
var RelatedContent =
|
|
1202
|
+
var RelatedContent = function RelatedContent() {
|
|
1204
1203
|
return React__default.createElement(
|
|
1205
1204
|
'div',
|
|
1206
1205
|
null,
|
|
@@ -1236,7 +1235,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1236
1235
|
)
|
|
1237
1236
|
)
|
|
1238
1237
|
);
|
|
1239
|
-
}
|
|
1238
|
+
};
|
|
1240
1239
|
|
|
1241
1240
|
var form = function form() {
|
|
1242
1241
|
return React__default.createElement(
|
|
@@ -1576,8 +1575,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1576
1575
|
} },
|
|
1577
1576
|
React__default.createElement(
|
|
1578
1577
|
'div',
|
|
1579
|
-
{ id: 'article__block',
|
|
1580
|
-
React__default.createElement(PixelTrackingArticle, { article: article, infiniteScroll: props.infiniteScroll }),
|
|
1578
|
+
{ id: 'article__block', ref: ref },
|
|
1581
1579
|
React__default.createElement(
|
|
1582
1580
|
'div',
|
|
1583
1581
|
{ className: 'video-detail', style: { marginBottom: isCutomPage(props.article) || showIsi && Array.isArray(isi) && isi.length > 0 ? '15rem' : 0 } },
|
|
@@ -2120,10 +2118,9 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
2120
2118
|
changeMeta(meta);
|
|
2121
2119
|
}
|
|
2122
2120
|
if (props.setCustomDimensions) {
|
|
2123
|
-
props.setCustomDimensions(activeArticle, '200', prevUrl
|
|
2121
|
+
props.setCustomDimensions(activeArticle, '200', prevUrl);
|
|
2124
2122
|
}
|
|
2125
2123
|
if (props.pageview) props.pageview(newPath, null, pageviewProperties);
|
|
2126
|
-
if (props.gtagSetCustomDimensions) props.gtagSetCustomDimensions(activeArticle, '200', prevUrl, '', true);
|
|
2127
2124
|
refreshAD(path);
|
|
2128
2125
|
};
|
|
2129
2126
|
|
|
@@ -2165,7 +2162,6 @@ var View = function View(props) {
|
|
|
2165
2162
|
props.sponsoredTaxonomies;
|
|
2166
2163
|
var Ads = props.Ads,
|
|
2167
2164
|
setCustomDimensions = props.setCustomDimensions,
|
|
2168
|
-
gtagSetCustomDimensions = props.gtagSetCustomDimensions,
|
|
2169
2165
|
statusCode = props.statusCode,
|
|
2170
2166
|
prevUrl = props.prevUrl,
|
|
2171
2167
|
pageview = props.pageview,
|
|
@@ -2197,7 +2193,7 @@ var View = function View(props) {
|
|
|
2197
2193
|
});
|
|
2198
2194
|
var waitAndExicute = function waitAndExicute() {
|
|
2199
2195
|
if (typeof window.GA_INITIALIZED !== 'undefined') {
|
|
2200
|
-
setCustomDimensions(article, statusCode, prevUrl
|
|
2196
|
+
setCustomDimensions(article, statusCode, prevUrl);
|
|
2201
2197
|
pageview(router.asPath, null, pageviewProperties);
|
|
2202
2198
|
} else timer = setTimeout(waitAndExicute, 1000);
|
|
2203
2199
|
};
|
|
@@ -2205,22 +2201,11 @@ var View = function View(props) {
|
|
|
2205
2201
|
return function () {
|
|
2206
2202
|
clearTimeout(timer);
|
|
2207
2203
|
};
|
|
2208
|
-
} else if (gtagSetCustomDimensions) {
|
|
2209
|
-
var _timer = void 0;
|
|
2210
|
-
var _waitAndExicute = function _waitAndExicute() {
|
|
2211
|
-
if (typeof window.GA_INITIALIZED !== 'undefined') {
|
|
2212
|
-
gtagSetCustomDimensions(article, statusCode, prevUrl, '', false);
|
|
2213
|
-
} else _timer = setTimeout(_waitAndExicute, 1000);
|
|
2214
|
-
};
|
|
2215
|
-
_waitAndExicute();
|
|
2216
|
-
return function () {
|
|
2217
|
-
clearTimeout(_timer);
|
|
2218
|
-
};
|
|
2219
2204
|
}
|
|
2220
2205
|
}, []);
|
|
2221
2206
|
|
|
2222
2207
|
var isVideoSeries = false;
|
|
2223
|
-
//
|
|
2208
|
+
//check for certain serializers that need to disable infinite scroll
|
|
2224
2209
|
var checkBodyForDisableInfiniteScroll = function checkBodyForDisableInfiniteScroll(article) {
|
|
2225
2210
|
if (!article || !article.body) {
|
|
2226
2211
|
return false;
|
|
@@ -2357,7 +2342,7 @@ var View = function View(props) {
|
|
|
2357
2342
|
);
|
|
2358
2343
|
};
|
|
2359
2344
|
|
|
2360
|
-
//
|
|
2345
|
+
//This should be called in /view/[url] getInitialProps to fetch the article data and related articles. This will also set the sponsoredFlag to true if any taxonomies have disabled ads.
|
|
2361
2346
|
View.returnGetInitialProps = function () {
|
|
2362
2347
|
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(url, prevUrl, seriesVid, client, sao) {
|
|
2363
2348
|
var context = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
|
|
@@ -2430,7 +2415,7 @@ View.returnGetInitialProps = function () {
|
|
|
2430
2415
|
});
|
|
2431
2416
|
}
|
|
2432
2417
|
sponsoredFlag = false;
|
|
2433
|
-
//
|
|
2418
|
+
//check for disableAds flag on each taxonomoy
|
|
2434
2419
|
|
|
2435
2420
|
if (article && article.content_placement) {
|
|
2436
2421
|
article.content_placement.forEach(function (x) {
|
|
@@ -2439,7 +2424,7 @@ View.returnGetInitialProps = function () {
|
|
|
2439
2424
|
}
|
|
2440
2425
|
});
|
|
2441
2426
|
}
|
|
2442
|
-
//
|
|
2427
|
+
//check for disableAds flag on content category
|
|
2443
2428
|
if (article.category && article.category.disableAds) {
|
|
2444
2429
|
sponsoredFlag = true;
|
|
2445
2430
|
}
|
package/dist/esm/getQuery.js
CHANGED
|
@@ -9,9 +9,9 @@ var getQuery = function getQuery(type) {
|
|
|
9
9
|
switch (type) {
|
|
10
10
|
// quiz video series and slideshow
|
|
11
11
|
case 'related':
|
|
12
|
-
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && isHealthcareProfessional != true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n && !defined(body[].quizzes)\n && !defined(body[].slides)\n && !defined(body[].articles)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n fieldAbstract,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare
|
|
12
|
+
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && isHealthcareProfessional != true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n && !defined(body[].quizzes)\n && !defined(body[].slides)\n && !defined(body[].articles)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n fieldAbstract,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n },\n \'url\' : pdf.asset-> url,\n \'pdf\': pdf.asset->,\n isbn_issn,\n abbreviatedJournal,\n }\n }';
|
|
13
13
|
case 'article':
|
|
14
|
-
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n fieldAbstract,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n },\n poster {\n _type,\n asset-> \n }\n },\n articles[]{\n ...,\n thumbnail{\n ...,\n asset-> \n },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare
|
|
14
|
+
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n fieldAbstract,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n },\n poster {\n _type,\n asset-> \n }\n },\n articles[]{\n ...,\n thumbnail{\n ...,\n asset-> \n },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n disableEpisodeNumber,\n excludeRelatedContents,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\n \'path\': identifier.current,\n hideSeriesSlider\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n year,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n show_download_ris_button,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current,\n show_download_ris_button,\n },\n \'url\' : pdf.asset-> url,\n \'pdf\': pdf.asset->,\n isbn_issn,\n abbreviatedJournal,\n }\n\n }';
|
|
15
15
|
case 'publication':
|
|
16
16
|
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n thumbnail{ ..., asset-> },\n taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
|
|
17
17
|
case 'issue':
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './extends-6d8e3924.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { g as default } from './index-
|
|
3
|
+
export { g as default } from './index-0074586c.js';
|
|
4
4
|
import './BlockContent-1e73bd2c.js';
|
|
5
5
|
import './entities-6d9154b4.js';
|
|
6
6
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
@@ -7486,7 +7486,7 @@ var ReactPlayer = unwrapExports(ReactPlayer_1);
|
|
|
7486
7486
|
var Audio = function Audio(_ref) {
|
|
7487
7487
|
var node = _ref.node;
|
|
7488
7488
|
|
|
7489
|
-
var audioSource = node
|
|
7489
|
+
var audioSource = node.uploadAudio.asset.url;
|
|
7490
7490
|
var reportPlay = function reportPlay() {
|
|
7491
7491
|
console.log('Reporting audio playback play to GA');
|
|
7492
7492
|
ReactGA.event({
|
|
@@ -10362,15 +10362,6 @@ var BlockTable = function BlockTable(props) {
|
|
|
10362
10362
|
);
|
|
10363
10363
|
};
|
|
10364
10364
|
|
|
10365
|
-
var DigiohSmartTag = function DigiohSmartTag(props) {
|
|
10366
|
-
var _props$node = props.node,
|
|
10367
|
-
FormID = _props$node.FormID;
|
|
10368
|
-
_props$node.needSegmentSupport;
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
return React__default.createElement('div', { id: FormID });
|
|
10372
|
-
};
|
|
10373
|
-
|
|
10374
10365
|
var ScrollToElement = function ScrollToElement(elementId) {
|
|
10375
10366
|
var element = document.getElementById(elementId);
|
|
10376
10367
|
if (element) {
|
|
@@ -10589,7 +10580,6 @@ var getSerializers = function getSerializers() {
|
|
|
10589
10580
|
return React__default.createElement(Formstack, { FormID: FormID, Caption: Caption, needSegmentSupport: needSegmentSupport });
|
|
10590
10581
|
},
|
|
10591
10582
|
formassembly: FormAssembly,
|
|
10592
|
-
digiohSmartTag: DigiohSmartTag,
|
|
10593
10583
|
multimedia: function multimedia(_ref21) {
|
|
10594
10584
|
var node = _ref21.node;
|
|
10595
10585
|
|
package/dist/esm/index.js
CHANGED
|
@@ -78,7 +78,6 @@ import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
|
|
|
78
78
|
import PropTypes from 'prop-types';
|
|
79
79
|
import { m as momentTimezone } from './index-79cfd25c.js';
|
|
80
80
|
import ProgressBar from 'react-bootstrap/ProgressBar';
|
|
81
|
-
export { PixelTrackingArticle, PixelTrackingLandingPages } from './PixelTracking.js';
|
|
82
81
|
export { default as ForbesHero } from './ForbesHero.js';
|
|
83
82
|
export { default as HorizontalHero } from './HorizontalHero.js';
|
|
84
83
|
export { default as OncliveHero } from './OncliveHero.js';
|
|
@@ -87,7 +86,7 @@ export { default as VerticalHero } from './VerticalHero.js';
|
|
|
87
86
|
export { default as YahooHero } from './YahooHero.js';
|
|
88
87
|
export { default as GridHero } from './GridHero.js';
|
|
89
88
|
export { default as ConferenceArticleCard } from './ConferenceArticleCard.js';
|
|
90
|
-
export { g as getSerializers } from './index-
|
|
89
|
+
export { g as getSerializers } from './index-0074586c.js';
|
|
91
90
|
export { default as Beam } from './Beam.js';
|
|
92
91
|
export { default as Segment } from './Segment.js';
|
|
93
92
|
export { default as KMTracker } from './KMTracker.js';
|
package/package.json
CHANGED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var slicedToArray = require('./slicedToArray-067dd3bc.js');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var Router = require('next/router');
|
|
8
|
-
var visibilitySensor = require('./visibility-sensor-eb2c5b69.js');
|
|
9
|
-
require('./_commonjsHelpers-06173234.js');
|
|
10
|
-
require('./web.dom.iterable-d98303e0.js');
|
|
11
|
-
require('./core.get-iterator-method-5643aa10.js');
|
|
12
|
-
require('react-dom');
|
|
13
|
-
|
|
14
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
|
-
|
|
16
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
-
|
|
18
|
-
var PixelTrackingLandingPages = React__default['default'].memo(function (_ref) {
|
|
19
|
-
var pixelTracking = _ref.pixelTracking;
|
|
20
|
-
|
|
21
|
-
var _useState = React.useState(false),
|
|
22
|
-
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
23
|
-
needTracking = _useState2[0],
|
|
24
|
-
setNeedTracking = _useState2[1];
|
|
25
|
-
|
|
26
|
-
var _useState3 = React.useState(pixelTracking && pixelTracking.trackingCode ? pixelTracking.trackingCode : null),
|
|
27
|
-
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
28
|
-
trackingCode = _useState4[0];
|
|
29
|
-
_useState4[1];
|
|
30
|
-
|
|
31
|
-
if (!pixelTracking) return null;
|
|
32
|
-
|
|
33
|
-
var router = Router.useRouter();
|
|
34
|
-
|
|
35
|
-
React.useEffect(function () {
|
|
36
|
-
if (trackingCode && pixelTracking.is_active) {
|
|
37
|
-
setNeedTracking(true);
|
|
38
|
-
}
|
|
39
|
-
}, [trackingCode]);
|
|
40
|
-
|
|
41
|
-
React.useEffect(function () {
|
|
42
|
-
router.events.on('routeChangeComplete', function () {
|
|
43
|
-
handleReload();
|
|
44
|
-
});
|
|
45
|
-
return function () {
|
|
46
|
-
router.events.off('routeChangeComplete', function () {});
|
|
47
|
-
};
|
|
48
|
-
}, [router.events]);
|
|
49
|
-
|
|
50
|
-
var handleReload = function handleReload() {
|
|
51
|
-
setNeedTracking(false);
|
|
52
|
-
setTimeout(function () {
|
|
53
|
-
setNeedTracking(true);
|
|
54
|
-
}, 100);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
return React__default['default'].createElement(
|
|
58
|
-
React__default['default'].Fragment,
|
|
59
|
-
null,
|
|
60
|
-
needTracking && React__default['default'].createElement('div', { style: { height: '0', opacity: 0 }, key: trackingCode, dangerouslySetInnerHTML: { __html: trackingCode } })
|
|
61
|
-
);
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
// Article page tracking
|
|
65
|
-
|
|
66
|
-
var PixelTrackingArticle = React__default['default'].memo(function (_ref2) {
|
|
67
|
-
var article = _ref2.article,
|
|
68
|
-
infiniteScroll = _ref2.infiniteScroll;
|
|
69
|
-
|
|
70
|
-
var _useState5 = React.useState(false),
|
|
71
|
-
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
72
|
-
needTracking = _useState6[0],
|
|
73
|
-
setNeedTracking = _useState6[1];
|
|
74
|
-
|
|
75
|
-
var _useState7 = React.useState([]),
|
|
76
|
-
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
77
|
-
trackingCode = _useState8[0],
|
|
78
|
-
setTrackingCode = _useState8[1];
|
|
79
|
-
|
|
80
|
-
var _useState9 = React.useState(false),
|
|
81
|
-
_useState10 = slicedToArray._slicedToArray(_useState9, 2),
|
|
82
|
-
inView = _useState10[0],
|
|
83
|
-
setInView = _useState10[1];
|
|
84
|
-
|
|
85
|
-
var _useState11 = React.useState(0),
|
|
86
|
-
_useState12 = slicedToArray._slicedToArray(_useState11, 2),
|
|
87
|
-
containerHeight = _useState12[0],
|
|
88
|
-
setContainerHeight = _useState12[1];
|
|
89
|
-
|
|
90
|
-
if (!article) return null;
|
|
91
|
-
|
|
92
|
-
React.useEffect(function () {
|
|
93
|
-
setContainerHeight(window.innerHeight);
|
|
94
|
-
var trackingArray = [];
|
|
95
|
-
|
|
96
|
-
//content_placement
|
|
97
|
-
if (article.content_placement && article.content_placement.length) {
|
|
98
|
-
article.content_placement.forEach(function (cp) {
|
|
99
|
-
if (cp.pixelTrackingCode && cp.pixelTrackingCode.trackingCode && cp.pixelTrackingCode.is_active) {
|
|
100
|
-
// console.log('has pixel code: content placement :', cp.pixelTrackingCode.trackingCode)
|
|
101
|
-
if (!trackingArray.includes(cp.pixelTrackingCode.trackingCode)) {
|
|
102
|
-
trackingArray.push(cp.pixelTrackingCode.trackingCode);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
//documentGroup
|
|
109
|
-
if (article.documentGroup && article.documentGroup.pixelTrackingCode) {
|
|
110
|
-
if (article.documentGroup.pixelTrackingCode.trackingCode && article.documentGroup.pixelTrackingCode.is_active) {
|
|
111
|
-
// console.log('has pixel code: docGroup :', article.documentGroup.pixelTrackingCode.trackingCode)
|
|
112
|
-
if (!trackingArray.includes(article.documentGroup.pixelTrackingCode.trackingCode)) {
|
|
113
|
-
trackingArray.push(article.documentGroup.pixelTrackingCode.trackingCode);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
//documentGroupMapping
|
|
119
|
-
if (article.documentGroupMapping && article.documentGroupMapping.length) {
|
|
120
|
-
article.documentGroupMapping.forEach(function (dg) {
|
|
121
|
-
if (dg.pixelTrackingCode && dg.pixelTrackingCode.trackingCode && dg.pixelTrackingCode.is_active) {
|
|
122
|
-
// console.log('has pixel code: DG Mapping :', dg.pixelTrackingCode.trackingCode)
|
|
123
|
-
if (!trackingArray.includes(dg.pixelTrackingCode.trackingCode)) {
|
|
124
|
-
trackingArray.push(dg.pixelTrackingCode.trackingCode);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
if (trackingArray.length > 0) {
|
|
130
|
-
setTrackingCode(trackingArray);
|
|
131
|
-
}
|
|
132
|
-
}, []);
|
|
133
|
-
|
|
134
|
-
React.useEffect(function () {
|
|
135
|
-
if (trackingCode && trackingCode.length > 0) {
|
|
136
|
-
setNeedTracking(true);
|
|
137
|
-
}
|
|
138
|
-
}, [trackingCode]);
|
|
139
|
-
|
|
140
|
-
var triggerOffset = 20;
|
|
141
|
-
return React__default['default'].createElement(
|
|
142
|
-
visibilitySensor.VisibilitySensor,
|
|
143
|
-
{
|
|
144
|
-
partialVisibility: true,
|
|
145
|
-
offset: { bottom: triggerOffset, top: containerHeight && containerHeight },
|
|
146
|
-
onChange: function onChange(isVisible) {
|
|
147
|
-
|
|
148
|
-
if (isVisible && !inView) {
|
|
149
|
-
setInView(true);
|
|
150
|
-
} else if (infiniteScroll) {
|
|
151
|
-
if (inView) setInView(false);
|
|
152
|
-
}
|
|
153
|
-
} },
|
|
154
|
-
React__default['default'].createElement(
|
|
155
|
-
'div',
|
|
156
|
-
{ style: { height: '100%', position: 'absolute', width: '1px', opacity: 0 } },
|
|
157
|
-
needTracking && inView && trackingCode && trackingCode.map(function (code, index) {
|
|
158
|
-
return React__default['default'].createElement('span', { key: code, id: 'pixel-' + (index + 1), dangerouslySetInnerHTML: { __html: code } });
|
|
159
|
-
})
|
|
160
|
-
)
|
|
161
|
-
);
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
exports.PixelTrackingArticle = PixelTrackingArticle;
|
|
165
|
-
exports.PixelTrackingLandingPages = PixelTrackingLandingPages;
|