@mjhls/mjh-framework 1.0.967 → 1.0.968

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 (36) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/ArticleProgramLandingPage.js +1 -1
  3. package/dist/cjs/ExternalResources.js +1 -1
  4. package/dist/cjs/HorizontalArticleListing.js +1 -1
  5. package/dist/cjs/IssueLanding.js +1 -1
  6. package/dist/cjs/{MediaSeriesCard-ce2ed9b7.js → MediaSeriesCard-d4bb0056.js} +1 -1
  7. package/dist/cjs/MediaSeriesLanding.js +3 -3
  8. package/dist/cjs/MediaSeriesLandingPaginated.js +3 -3
  9. package/dist/cjs/PartnerDetailListing.js +3 -3
  10. package/dist/cjs/PartnerDetailListingPaginated.js +3 -3
  11. package/dist/cjs/PixelTracking.js +165 -0
  12. package/dist/cjs/TaxonomyDescription.js +2 -2
  13. package/dist/cjs/VideoProgramLandingPage.js +1 -1
  14. package/dist/cjs/View.js +7 -5
  15. package/dist/cjs/getQuery.js +2 -2
  16. package/dist/cjs/getSerializers.js +1 -1
  17. package/dist/cjs/{index-6bab3b25.js → index-49763ee1.js} +1 -1
  18. package/dist/cjs/index.js +4 -1
  19. package/dist/esm/ArticleProgramLandingPage.js +1 -1
  20. package/dist/esm/ExternalResources.js +1 -1
  21. package/dist/esm/HorizontalArticleListing.js +1 -1
  22. package/dist/esm/IssueLanding.js +1 -1
  23. package/dist/esm/{MediaSeriesCard-9618d893.js → MediaSeriesCard-56b20846.js} +1 -1
  24. package/dist/esm/MediaSeriesLanding.js +3 -3
  25. package/dist/esm/MediaSeriesLandingPaginated.js +3 -3
  26. package/dist/esm/PartnerDetailListing.js +3 -3
  27. package/dist/esm/PartnerDetailListingPaginated.js +3 -3
  28. package/dist/esm/PixelTracking.js +156 -0
  29. package/dist/esm/TaxonomyDescription.js +2 -2
  30. package/dist/esm/VideoProgramLandingPage.js +1 -1
  31. package/dist/esm/View.js +7 -5
  32. package/dist/esm/getQuery.js +2 -2
  33. package/dist/esm/getSerializers.js +1 -1
  34. package/dist/esm/{index-0074586c.js → index-5f2c18b9.js} +1 -1
  35. package/dist/esm/index.js +2 -1
  36. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # mjh-framework v. 1.0.967
1
+ # mjh-framework v. 1.0.968
2
2
 
3
3
  [![NPM](https://img.shields.io/npm/v/mjh-framework.svg)](https://www.npmjs.com/package/mjh-framework) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
4
4
 
@@ -5,7 +5,7 @@ var slicedToArray = require('./slicedToArray-067dd3bc.js');
5
5
  var _extends = require('./extends-7c86182f.js');
6
6
  var React = require('react');
7
7
  var BlockContent = require('./BlockContent-9ebd251f.js');
8
- var getSerializers = require('./index-6bab3b25.js');
8
+ var getSerializers = require('./index-49763ee1.js');
9
9
  var ArticleSeriesListing = require('./ArticleSeriesListing.js');
10
10
  require('./_commonjsHelpers-06173234.js');
11
11
  require('./core.get-iterator-method-5643aa10.js');
@@ -4,7 +4,7 @@ var _extends = require('./extends-7c86182f.js');
4
4
  var slicedToArray = require('./slicedToArray-067dd3bc.js');
5
5
  var React = require('react');
6
6
  var BlockContent = require('./BlockContent-9ebd251f.js');
7
- var getSerializers = require('./index-6bab3b25.js');
7
+ var getSerializers = require('./index-49763ee1.js');
8
8
  var index = require('./index-f86bb269.js');
9
9
  var Router = require('next/router');
10
10
  var Button = require('react-bootstrap/Button');
@@ -5,7 +5,7 @@ var React = require('react');
5
5
  var ArticleCarousel = require('./ArticleCarousel.js');
6
6
  var index_esm = require('./index.esm-d81454e7.js');
7
7
  var BlockContent = require('./BlockContent-9ebd251f.js');
8
- var getSerializers = require('./index-6bab3b25.js');
8
+ var getSerializers = require('./index-49763ee1.js');
9
9
  require('./_commonjsHelpers-06173234.js');
10
10
  require('./core.get-iterator-method-5643aa10.js');
11
11
  require('./_object-pie-083f2dd6.js');
@@ -5,7 +5,7 @@ var React = require('react');
5
5
  var QueueDeckExpanded = require('./QueueDeckExpanded.js');
6
6
  var Breadcrumbs = require('./Breadcrumbs.js');
7
7
  var BlockContent = require('./BlockContent-9ebd251f.js');
8
- var getSerializers = require('./index-6bab3b25.js');
8
+ var getSerializers = require('./index-49763ee1.js');
9
9
  require('./_commonjsHelpers-06173234.js');
10
10
  require('./core.get-iterator-method-5643aa10.js');
11
11
  require('./_object-pie-083f2dd6.js');
@@ -11,7 +11,7 @@ var urlFor = require('./urlFor.js');
11
11
  var moment = require('./moment-aca40de1.js');
12
12
  var styleInject_es = require('./style-inject.es-dcee06b6.js');
13
13
  var BlockContent = require('./BlockContent-9ebd251f.js');
14
- var getSerializers = require('./index-6bab3b25.js');
14
+ var getSerializers = require('./index-49763ee1.js');
15
15
 
16
16
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
17
 
@@ -5,13 +5,13 @@ var _typeof = require('./typeof-567e31ff.js');
5
5
  var _extends = require('./extends-7c86182f.js');
6
6
  var slicedToArray = require('./slicedToArray-067dd3bc.js');
7
7
  var React = require('react');
8
- var MediaSeriesCard = require('./MediaSeriesCard-ce2ed9b7.js');
8
+ var MediaSeriesCard = require('./MediaSeriesCard-d4bb0056.js');
9
9
  require('./index-50be6759.js');
10
10
  require('react-dom');
11
11
  var Link = require('next/link');
12
12
  var MasterDeck = require('./MasterDeck.js');
13
13
  var BlockContent = require('./BlockContent-9ebd251f.js');
14
- var getSerializers = require('./index-6bab3b25.js');
14
+ var getSerializers = require('./index-49763ee1.js');
15
15
  require('./_commonjsHelpers-06173234.js');
16
16
  require('./core.get-iterator-method-5643aa10.js');
17
17
  require('./web.dom.iterable-d98303e0.js');
@@ -403,7 +403,7 @@ MediaSeriesLanding.getInitialData = function () {
403
403
  itemsPerPage: itemsPerPage
404
404
  };
405
405
  _context2.next = 9;
406
- return client.fetch('*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id, \n isGated,\n name,\n description\n }');
406
+ return client.fetch('*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id, \n isGated,\n name,\n description,\n pixelTrackingCode->\n }');
407
407
 
408
408
  case 9:
409
409
  docGroupID = _context2.sent;
@@ -5,13 +5,13 @@ var _typeof = require('./typeof-567e31ff.js');
5
5
  var _extends = require('./extends-7c86182f.js');
6
6
  var slicedToArray = require('./slicedToArray-067dd3bc.js');
7
7
  var React = require('react');
8
- var MediaSeriesCard = require('./MediaSeriesCard-ce2ed9b7.js');
8
+ var MediaSeriesCard = require('./MediaSeriesCard-d4bb0056.js');
9
9
  require('./index-50be6759.js');
10
10
  require('react-dom');
11
11
  var Link = require('next/link');
12
12
  var BlockContent = require('./BlockContent-9ebd251f.js');
13
13
  var MasterDeckPaginated = require('./MasterDeckPaginated.js');
14
- var getSerializers = require('./index-6bab3b25.js');
14
+ var getSerializers = require('./index-49763ee1.js');
15
15
  require('./_commonjsHelpers-06173234.js');
16
16
  require('./core.get-iterator-method-5643aa10.js');
17
17
  require('./web.dom.iterable-d98303e0.js');
@@ -424,7 +424,7 @@ MediaSeriesLanding.getInitialData = function () {
424
424
  itemsPerPage: itemsPerPage
425
425
  };
426
426
  _context2.next = 9;
427
- return client.fetch('*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id, \n isGated,\n name,\n description\n }');
427
+ return client.fetch('*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id, \n isGated,\n name,\n description,\n pixelTrackingCode->\n }');
428
428
 
429
429
  case 9:
430
430
  docGroupID = _context2.sent;
@@ -13,7 +13,7 @@ var QueueDeckExpanded = require('./QueueDeckExpanded.js');
13
13
  var Breadcrumbs = require('./Breadcrumbs.js');
14
14
  var Feature = require('./Feature.js');
15
15
  var urlFor = require('./urlFor.js');
16
- var getSerializers = require('./index-6bab3b25.js');
16
+ var getSerializers = require('./index-49763ee1.js');
17
17
  var BlockContent = require('./BlockContent-9ebd251f.js');
18
18
  require('./_commonjsHelpers-06173234.js');
19
19
  require('./core.get-iterator-method-5643aa10.js');
@@ -253,14 +253,14 @@ PartnerDetails.returnGetInitialProps = function () {
253
253
  case 0:
254
254
  today = moment.moment().utc().format();
255
255
  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 }';
256
- 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 }';
256
+ partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n pixelTrackingCode->,\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 }';
257
257
 
258
258
 
259
259
  if (category) {
260
260
  // if partners page has a sub category such as onclive
261
261
  // e.g. /sap-partner/[category]/[partner]
262
262
 
263
- 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 }';
263
+ 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 pixelTrackingCode->,\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 }';
264
264
  }
265
265
 
266
266
  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 }';
@@ -13,7 +13,7 @@ var QueueDeckExpandedPaginated = require('./QueueDeckExpandedPaginated.js');
13
13
  var Breadcrumbs = require('./Breadcrumbs.js');
14
14
  var Feature = require('./Feature.js');
15
15
  var urlFor = require('./urlFor.js');
16
- var getSerializers = require('./index-6bab3b25.js');
16
+ var getSerializers = require('./index-49763ee1.js');
17
17
  var BlockContent = require('./BlockContent-9ebd251f.js');
18
18
  require('./_commonjsHelpers-06173234.js');
19
19
  require('./core.get-iterator-method-5643aa10.js');
@@ -246,14 +246,14 @@ PartnerDetails.returnGetInitialProps = function () {
246
246
  switch (_context.prev = _context.next) {
247
247
  case 0:
248
248
  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 }';
249
- 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 }';
249
+ partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n pixelTrackingCode->,\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 }';
250
250
 
251
251
 
252
252
  if (category) {
253
253
  // if partners page has a sub category such as onclive
254
254
  // e.g. /sap-partner/[category]/[partner]
255
255
 
256
- 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 }';
256
+ 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 pixelTrackingCode->,\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 }';
257
257
  }
258
258
 
259
259
  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 }';
@@ -0,0 +1,165 @@
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;
@@ -7,7 +7,7 @@ var React = require('react');
7
7
  var Router = require('next/router');
8
8
  var Head = require('next/head');
9
9
  var BlockContent = require('./BlockContent-9ebd251f.js');
10
- var getSerializers = require('./index-6bab3b25.js');
10
+ var getSerializers = require('./index-49763ee1.js');
11
11
  require('./_commonjsHelpers-06173234.js');
12
12
  require('./core.get-iterator-method-5643aa10.js');
13
13
  require('./_object-pie-083f2dd6.js');
@@ -167,7 +167,7 @@ TaxonomyDescription.getDescription = function () {
167
167
  while (1) {
168
168
  switch (_context2.prev = _context2.next) {
169
169
  case 0:
170
- query = '*[_type == \'taxonomy\' && identifier == \'' + url + '\'][0].summary';
170
+ query = '*[_type == \'taxonomy\' && identifier == \'' + url + '\'][0]{summary,pixelTrackingCode->}';
171
171
  summary = [];
172
172
  _context2.prev = 2;
173
173
  _context2.next = 5;
@@ -7,7 +7,7 @@ var BlockContent = require('./BlockContent-9ebd251f.js');
7
7
  var Col = require('react-bootstrap/Col');
8
8
  var Form = require('react-bootstrap/Form');
9
9
  var Button = require('react-bootstrap/Button');
10
- var getSerializers = require('./index-6bab3b25.js');
10
+ var getSerializers = require('./index-49763ee1.js');
11
11
  var VideoSeriesListing = require('./VideoSeriesListing.js');
12
12
  require('./_commonjsHelpers-06173234.js');
13
13
  require('./core.get-iterator-method-5643aa10.js');
package/dist/cjs/View.js CHANGED
@@ -17,7 +17,7 @@ var FormControl = require('react-bootstrap/FormControl');
17
17
  var Button = require('react-bootstrap/Button');
18
18
  var visibilitySensor = require('./visibility-sensor-eb2c5b69.js');
19
19
  var SocialShare = require('./SocialShare.js');
20
- var getSerializers = require('./index-6bab3b25.js');
20
+ var getSerializers = require('./index-49763ee1.js');
21
21
  var AdSlot = require('./AdSlot.js');
22
22
  var SeriesSlider = require('./SeriesSlider-594b19eb.js');
23
23
  var getTargeting = require('./getTargeting-3c5754ac.js');
@@ -31,6 +31,7 @@ require('./index-eadd5035.js');
31
31
  var disqusReact = require('disqus-react');
32
32
  var Schema = require('./Schema.js');
33
33
  var FileSaver = require('file-saver');
34
+ var PixelTracking = require('./PixelTracking.js');
34
35
  var keys = require('./keys-e982b3fa.js');
35
36
  var index_es = require('./index.es-f3e47207.js');
36
37
  var index = require('./index-fc2f1ca2.js');
@@ -672,7 +673,7 @@ var Recommended = function Recommended(props) {
672
673
 
673
674
  return React__default['default'].createElement(
674
675
  'div',
675
- { id: 'recommended' },
676
+ { id: 'recommended', style: { minHeight: '150px' } },
676
677
  loaded === 'loaded' && React__default['default'].createElement(
677
678
  React__default['default'].Fragment,
678
679
  null,
@@ -1205,7 +1206,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
1205
1206
  return null;
1206
1207
  };
1207
1208
 
1208
- var RelatedContent = function RelatedContent() {
1209
+ var RelatedContent = React__default['default'].memo(function () {
1209
1210
  return React__default['default'].createElement(
1210
1211
  'div',
1211
1212
  null,
@@ -1241,7 +1242,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
1241
1242
  )
1242
1243
  )
1243
1244
  );
1244
- };
1245
+ });
1245
1246
 
1246
1247
  var form = function form() {
1247
1248
  return React__default['default'].createElement(
@@ -1581,7 +1582,8 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
1581
1582
  } },
1582
1583
  React__default['default'].createElement(
1583
1584
  'div',
1584
- { id: 'article__block', ref: ref },
1585
+ { id: 'article__block', style: { position: 'relative' }, ref: ref },
1586
+ React__default['default'].createElement(PixelTracking.PixelTrackingArticle, { article: article, infiniteScroll: props.infiniteScroll }),
1585
1587
  React__default['default'].createElement(
1586
1588
  'div',
1587
1589
  { className: 'video-detail', style: { marginBottom: isCutomPage(props.article) || showIsi && Array.isArray(isi) && isi.length > 0 ? '15rem' : 0 } },
@@ -11,9 +11,9 @@ var getQuery = function getQuery(type) {
11
11
  switch (type) {
12
12
  // quiz video series and slideshow
13
13
  case 'related':
14
- 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 }';
14
+ 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 pixelTrackingCode->\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider,\n pixelTrackingCode->\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 pixelTrackingCode->\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 }';
15
15
  case 'article':
16
- 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 }';
16
+ 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 pixelTrackingCode->\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 pixelTrackingCode->\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 pixelTrackingCode->\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 }';
17
17
  case 'publication':
18
18
  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 }';
19
19
  case 'issue':
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./extends-7c86182f.js');
4
4
  require('react');
5
- var getSerializers = require('./index-6bab3b25.js');
5
+ var getSerializers = require('./index-49763ee1.js');
6
6
  require('./BlockContent-9ebd251f.js');
7
7
  require('./entities-df1aed86.js');
8
8
  require('./_commonjsHelpers-06173234.js');
@@ -7506,7 +7506,7 @@ var ReactPlayer = _commonjsHelpers.unwrapExports(ReactPlayer_1);
7506
7506
  var Audio = function Audio(_ref) {
7507
7507
  var node = _ref.node;
7508
7508
 
7509
- var audioSource = node.uploadAudio.asset.url;
7509
+ var audioSource = node && node.uploadAudio ? node.uploadAudio.asset.url : '';
7510
7510
  var reportPlay = function reportPlay() {
7511
7511
  console.log('Reporting audio playback play to GA');
7512
7512
  ReactGA__default['default'].event({
package/dist/cjs/index.js CHANGED
@@ -81,6 +81,7 @@ var slicedToArray = require('./slicedToArray-067dd3bc.js');
81
81
  var PropTypes = require('prop-types');
82
82
  var index$1 = require('./index-f86bb269.js');
83
83
  var ProgressBar = require('react-bootstrap/ProgressBar');
84
+ var PixelTracking = require('./PixelTracking.js');
84
85
  var ForbesHero = require('./ForbesHero.js');
85
86
  var HorizontalHero = require('./HorizontalHero.js');
86
87
  var OncliveHero = require('./OncliveHero.js');
@@ -89,7 +90,7 @@ var VerticalHero = require('./VerticalHero.js');
89
90
  var YahooHero = require('./YahooHero.js');
90
91
  var GridHero = require('./GridHero.js');
91
92
  var ConferenceArticleCard = require('./ConferenceArticleCard.js');
92
- var getSerializers = require('./index-6bab3b25.js');
93
+ var getSerializers = require('./index-49763ee1.js');
93
94
  var Beam = require('./Beam.js');
94
95
  var Segment = require('./Segment.js');
95
96
  var KMTracker = require('./KMTracker.js');
@@ -612,6 +613,8 @@ exports.ArticleCarousel = ArticleCarousel;
612
613
  exports.TaxonomyDescription = TaxonomyDescription;
613
614
  exports.PubToc = PubToc;
614
615
  exports.PubSection = PubSection;
616
+ exports.PixelTrackingArticle = PixelTracking.PixelTrackingArticle;
617
+ exports.PixelTrackingLandingPages = PixelTracking.PixelTrackingLandingPages;
615
618
  exports.ForbesHero = ForbesHero;
616
619
  exports.HorizontalHero = HorizontalHero;
617
620
  exports.OncliveHero = OncliveHero;
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
3
3
  import { _ as _extends } from './extends-6d8e3924.js';
4
4
  import React__default from 'react';
5
5
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
6
- import { g as getSerializers } from './index-0074586c.js';
6
+ import { g as getSerializers } from './index-5f2c18b9.js';
7
7
  import ArticleSeriesListing from './ArticleSeriesListing.js';
8
8
  import './_commonjsHelpers-0c4b6f40.js';
9
9
  import './core.get-iterator-method-ea258bb1.js';
@@ -2,7 +2,7 @@ import { _ as _extends } from './extends-6d8e3924.js';
2
2
  import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
3
3
  import React__default, { useState, useEffect } from 'react';
4
4
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
5
- import { g as getSerializers } from './index-0074586c.js';
5
+ import { g as getSerializers } from './index-5f2c18b9.js';
6
6
  import { m as momentTimezone } from './index-79cfd25c.js';
7
7
  import { useRouter } from 'next/router';
8
8
  import Button from 'react-bootstrap/Button';
@@ -3,7 +3,7 @@ import React__default from 'react';
3
3
  import ArticleCarousel from './ArticleCarousel.js';
4
4
  import { I as IoIosArrowForward } from './index.esm-eb1e8e80.js';
5
5
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
6
- import { g as getSerializers } from './index-0074586c.js';
6
+ import { g as getSerializers } from './index-5f2c18b9.js';
7
7
  import './_commonjsHelpers-0c4b6f40.js';
8
8
  import './core.get-iterator-method-ea258bb1.js';
9
9
  import './_object-pie-133f504a.js';
@@ -3,7 +3,7 @@ import React__default from 'react';
3
3
  import QueueDeckExpanded from './QueueDeckExpanded.js';
4
4
  import Breadcrumbs from './Breadcrumbs.js';
5
5
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
6
- import { g as getSerializers } from './index-0074586c.js';
6
+ import { g as getSerializers } from './index-5f2c18b9.js';
7
7
  import './_commonjsHelpers-0c4b6f40.js';
8
8
  import './core.get-iterator-method-ea258bb1.js';
9
9
  import './_object-pie-133f504a.js';
@@ -9,7 +9,7 @@ import urlFor from './urlFor.js';
9
9
  import { m as moment } from './moment-bc12cb97.js';
10
10
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
11
11
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
12
- import { g as getSerializers } from './index-0074586c.js';
12
+ import { g as getSerializers } from './index-5f2c18b9.js';
13
13
 
14
14
  /**
15
15
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -3,13 +3,13 @@ import { _ as _typeof } from './typeof-e9fc0c5d.js';
3
3
  import { _ as _extends } from './extends-6d8e3924.js';
4
4
  import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
5
5
  import React__default, { useState, useEffect } from 'react';
6
- import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-9618d893.js';
6
+ import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-56b20846.js';
7
7
  import './index-98ca9cec.js';
8
8
  import 'react-dom';
9
9
  import Link from 'next/link';
10
10
  import MasterDeck from './MasterDeck.js';
11
11
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
12
- import { g as getSerializers } from './index-0074586c.js';
12
+ import { g as getSerializers } from './index-5f2c18b9.js';
13
13
  import './_commonjsHelpers-0c4b6f40.js';
14
14
  import './core.get-iterator-method-ea258bb1.js';
15
15
  import './web.dom.iterable-ab4dea5c.js';
@@ -396,7 +396,7 @@ MediaSeriesLanding.getInitialData = function () {
396
396
  itemsPerPage: itemsPerPage
397
397
  };
398
398
  _context2.next = 9;
399
- return client.fetch('*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id, \n isGated,\n name,\n description\n }');
399
+ return client.fetch('*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id, \n isGated,\n name,\n description,\n pixelTrackingCode->\n }');
400
400
 
401
401
  case 9:
402
402
  docGroupID = _context2.sent;
@@ -3,13 +3,13 @@ import { _ as _typeof } from './typeof-e9fc0c5d.js';
3
3
  import { _ as _extends } from './extends-6d8e3924.js';
4
4
  import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
5
5
  import React__default, { useState, useEffect } from 'react';
6
- import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-9618d893.js';
6
+ import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-56b20846.js';
7
7
  import './index-98ca9cec.js';
8
8
  import 'react-dom';
9
9
  import Link from 'next/link';
10
10
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
11
11
  import MasterDeck from './MasterDeckPaginated.js';
12
- import { g as getSerializers } from './index-0074586c.js';
12
+ import { g as getSerializers } from './index-5f2c18b9.js';
13
13
  import './_commonjsHelpers-0c4b6f40.js';
14
14
  import './core.get-iterator-method-ea258bb1.js';
15
15
  import './web.dom.iterable-ab4dea5c.js';
@@ -417,7 +417,7 @@ MediaSeriesLanding.getInitialData = function () {
417
417
  itemsPerPage: itemsPerPage
418
418
  };
419
419
  _context2.next = 9;
420
- return client.fetch('*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id, \n isGated,\n name,\n description\n }');
420
+ return client.fetch('*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id, \n isGated,\n name,\n description,\n pixelTrackingCode->\n }');
421
421
 
422
422
  case 9:
423
423
  docGroupID = _context2.sent;
@@ -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-0074586c.js';
14
+ import { g as getSerializers } from './index-5f2c18b9.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';
@@ -247,14 +247,14 @@ PartnerDetails.returnGetInitialProps = function () {
247
247
  case 0:
248
248
  today = moment().utc().format();
249
249
  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 }';
250
- 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 }';
250
+ partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n pixelTrackingCode->,\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 }';
251
251
 
252
252
 
253
253
  if (category) {
254
254
  // if partners page has a sub category such as onclive
255
255
  // e.g. /sap-partner/[category]/[partner]
256
256
 
257
- 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 }';
257
+ 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 pixelTrackingCode->,\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 }';
258
258
  }
259
259
 
260
260
  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-0074586c.js';
14
+ import { g as getSerializers } from './index-5f2c18b9.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';
@@ -240,14 +240,14 @@ PartnerDetails.returnGetInitialProps = function () {
240
240
  switch (_context.prev = _context.next) {
241
241
  case 0:
242
242
  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 }';
243
- 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
+ partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n pixelTrackingCode->,\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 }';
244
244
 
245
245
 
246
246
  if (category) {
247
247
  // if partners page has a sub category such as onclive
248
248
  // e.g. /sap-partner/[category]/[partner]
249
249
 
250
- 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
+ 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 pixelTrackingCode->,\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 }';
251
251
  }
252
252
 
253
253
  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 }';
@@ -0,0 +1,156 @@
1
+ import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
2
+ import React__default, { useState, useEffect } from 'react';
3
+ import { useRouter } from 'next/router';
4
+ import { V as VisibilitySensor } from './visibility-sensor-72fd8f8b.js';
5
+ import './_commonjsHelpers-0c4b6f40.js';
6
+ import './web.dom.iterable-ab4dea5c.js';
7
+ import './core.get-iterator-method-ea258bb1.js';
8
+ import 'react-dom';
9
+
10
+ var PixelTrackingLandingPages = React__default.memo(function (_ref) {
11
+ var pixelTracking = _ref.pixelTracking;
12
+
13
+ var _useState = useState(false),
14
+ _useState2 = _slicedToArray(_useState, 2),
15
+ needTracking = _useState2[0],
16
+ setNeedTracking = _useState2[1];
17
+
18
+ var _useState3 = useState(pixelTracking && pixelTracking.trackingCode ? pixelTracking.trackingCode : null),
19
+ _useState4 = _slicedToArray(_useState3, 2),
20
+ trackingCode = _useState4[0];
21
+ _useState4[1];
22
+
23
+ if (!pixelTracking) return null;
24
+
25
+ var router = useRouter();
26
+
27
+ useEffect(function () {
28
+ if (trackingCode && pixelTracking.is_active) {
29
+ setNeedTracking(true);
30
+ }
31
+ }, [trackingCode]);
32
+
33
+ useEffect(function () {
34
+ router.events.on('routeChangeComplete', function () {
35
+ handleReload();
36
+ });
37
+ return function () {
38
+ router.events.off('routeChangeComplete', function () {});
39
+ };
40
+ }, [router.events]);
41
+
42
+ var handleReload = function handleReload() {
43
+ setNeedTracking(false);
44
+ setTimeout(function () {
45
+ setNeedTracking(true);
46
+ }, 100);
47
+ };
48
+
49
+ return React__default.createElement(
50
+ React__default.Fragment,
51
+ null,
52
+ needTracking && React__default.createElement('div', { style: { height: '0', opacity: 0 }, key: trackingCode, dangerouslySetInnerHTML: { __html: trackingCode } })
53
+ );
54
+ });
55
+
56
+ // Article page tracking
57
+
58
+ var PixelTrackingArticle = React__default.memo(function (_ref2) {
59
+ var article = _ref2.article,
60
+ infiniteScroll = _ref2.infiniteScroll;
61
+
62
+ var _useState5 = useState(false),
63
+ _useState6 = _slicedToArray(_useState5, 2),
64
+ needTracking = _useState6[0],
65
+ setNeedTracking = _useState6[1];
66
+
67
+ var _useState7 = useState([]),
68
+ _useState8 = _slicedToArray(_useState7, 2),
69
+ trackingCode = _useState8[0],
70
+ setTrackingCode = _useState8[1];
71
+
72
+ var _useState9 = useState(false),
73
+ _useState10 = _slicedToArray(_useState9, 2),
74
+ inView = _useState10[0],
75
+ setInView = _useState10[1];
76
+
77
+ var _useState11 = useState(0),
78
+ _useState12 = _slicedToArray(_useState11, 2),
79
+ containerHeight = _useState12[0],
80
+ setContainerHeight = _useState12[1];
81
+
82
+ if (!article) return null;
83
+
84
+ useEffect(function () {
85
+ setContainerHeight(window.innerHeight);
86
+ var trackingArray = [];
87
+
88
+ //content_placement
89
+ if (article.content_placement && article.content_placement.length) {
90
+ article.content_placement.forEach(function (cp) {
91
+ if (cp.pixelTrackingCode && cp.pixelTrackingCode.trackingCode && cp.pixelTrackingCode.is_active) {
92
+ // console.log('has pixel code: content placement :', cp.pixelTrackingCode.trackingCode)
93
+ if (!trackingArray.includes(cp.pixelTrackingCode.trackingCode)) {
94
+ trackingArray.push(cp.pixelTrackingCode.trackingCode);
95
+ }
96
+ }
97
+ });
98
+ }
99
+
100
+ //documentGroup
101
+ if (article.documentGroup && article.documentGroup.pixelTrackingCode) {
102
+ if (article.documentGroup.pixelTrackingCode.trackingCode && article.documentGroup.pixelTrackingCode.is_active) {
103
+ // console.log('has pixel code: docGroup :', article.documentGroup.pixelTrackingCode.trackingCode)
104
+ if (!trackingArray.includes(article.documentGroup.pixelTrackingCode.trackingCode)) {
105
+ trackingArray.push(article.documentGroup.pixelTrackingCode.trackingCode);
106
+ }
107
+ }
108
+ }
109
+
110
+ //documentGroupMapping
111
+ if (article.documentGroupMapping && article.documentGroupMapping.length) {
112
+ article.documentGroupMapping.forEach(function (dg) {
113
+ if (dg.pixelTrackingCode && dg.pixelTrackingCode.trackingCode && dg.pixelTrackingCode.is_active) {
114
+ // console.log('has pixel code: DG Mapping :', dg.pixelTrackingCode.trackingCode)
115
+ if (!trackingArray.includes(dg.pixelTrackingCode.trackingCode)) {
116
+ trackingArray.push(dg.pixelTrackingCode.trackingCode);
117
+ }
118
+ }
119
+ });
120
+ }
121
+ if (trackingArray.length > 0) {
122
+ setTrackingCode(trackingArray);
123
+ }
124
+ }, []);
125
+
126
+ useEffect(function () {
127
+ if (trackingCode && trackingCode.length > 0) {
128
+ setNeedTracking(true);
129
+ }
130
+ }, [trackingCode]);
131
+
132
+ var triggerOffset = 20;
133
+ return React__default.createElement(
134
+ VisibilitySensor,
135
+ {
136
+ partialVisibility: true,
137
+ offset: { bottom: triggerOffset, top: containerHeight && containerHeight },
138
+ onChange: function onChange(isVisible) {
139
+
140
+ if (isVisible && !inView) {
141
+ setInView(true);
142
+ } else if (infiniteScroll) {
143
+ if (inView) setInView(false);
144
+ }
145
+ } },
146
+ React__default.createElement(
147
+ 'div',
148
+ { style: { height: '100%', position: 'absolute', width: '1px', opacity: 0 } },
149
+ needTracking && inView && trackingCode && trackingCode.map(function (code, index) {
150
+ return React__default.createElement('span', { key: code, id: 'pixel-' + (index + 1), dangerouslySetInnerHTML: { __html: code } });
151
+ })
152
+ )
153
+ );
154
+ });
155
+
156
+ export { PixelTrackingArticle, PixelTrackingLandingPages };
@@ -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-0074586c.js';
8
+ import { g as getSerializers } from './index-5f2c18b9.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].summary';
163
+ query = '*[_type == \'taxonomy\' && identifier == \'' + url + '\'][0]{summary,pixelTrackingCode->}';
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-0074586c.js';
8
+ import { g as getSerializers } from './index-5f2c18b9.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-0074586c.js';
18
+ import { r as renderAuthor, g as getSerializers } from './index-5f2c18b9.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,6 +29,7 @@ import './index-755f2cc2.js';
29
29
  import { DiscussionEmbed } from 'disqus-react';
30
30
  import Schema from './Schema.js';
31
31
  import FileSaver from 'file-saver';
32
+ import { PixelTrackingArticle } from './PixelTracking.js';
32
33
  import { _ as _Object$keys } from './keys-31dcdb31.js';
33
34
  import { I as InfiniteScroll } from './index.es-a6137319.js';
34
35
  import { l as lib_3 } from './index-f0fc23eb.js';
@@ -661,7 +662,7 @@ var Recommended = function Recommended(props) {
661
662
 
662
663
  return React__default.createElement(
663
664
  'div',
664
- { id: 'recommended' },
665
+ { id: 'recommended', style: { minHeight: '150px' } },
665
666
  loaded === 'loaded' && React__default.createElement(
666
667
  React__default.Fragment,
667
668
  null,
@@ -1194,7 +1195,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
1194
1195
  return null;
1195
1196
  };
1196
1197
 
1197
- var RelatedContent = function RelatedContent() {
1198
+ var RelatedContent = React__default.memo(function () {
1198
1199
  return React__default.createElement(
1199
1200
  'div',
1200
1201
  null,
@@ -1230,7 +1231,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
1230
1231
  )
1231
1232
  )
1232
1233
  );
1233
- };
1234
+ });
1234
1235
 
1235
1236
  var form = function form() {
1236
1237
  return React__default.createElement(
@@ -1570,7 +1571,8 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
1570
1571
  } },
1571
1572
  React__default.createElement(
1572
1573
  'div',
1573
- { id: 'article__block', ref: ref },
1574
+ { id: 'article__block', style: { position: 'relative' }, ref: ref },
1575
+ React__default.createElement(PixelTrackingArticle, { article: article, infiniteScroll: props.infiniteScroll }),
1574
1576
  React__default.createElement(
1575
1577
  'div',
1576
1578
  { className: 'video-detail', style: { marginBottom: isCutomPage(props.article) || showIsi && Array.isArray(isi) && isi.length > 0 ? '15rem' : 0 } },
@@ -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\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 }';
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 pixelTrackingCode->\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL,\n hideSeriesSlider,\n pixelTrackingCode->\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 pixelTrackingCode->\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\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 }';
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 pixelTrackingCode->\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 pixelTrackingCode->\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 pixelTrackingCode->\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-0074586c.js';
3
+ export { g as default } from './index-5f2c18b9.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.uploadAudio.asset.url;
7489
+ var audioSource = node && node.uploadAudio ? node.uploadAudio.asset.url : '';
7490
7490
  var reportPlay = function reportPlay() {
7491
7491
  console.log('Reporting audio playback play to GA');
7492
7492
  ReactGA.event({
package/dist/esm/index.js CHANGED
@@ -78,6 +78,7 @@ 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';
81
82
  export { default as ForbesHero } from './ForbesHero.js';
82
83
  export { default as HorizontalHero } from './HorizontalHero.js';
83
84
  export { default as OncliveHero } from './OncliveHero.js';
@@ -86,7 +87,7 @@ export { default as VerticalHero } from './VerticalHero.js';
86
87
  export { default as YahooHero } from './YahooHero.js';
87
88
  export { default as GridHero } from './GridHero.js';
88
89
  export { default as ConferenceArticleCard } from './ConferenceArticleCard.js';
89
- export { g as getSerializers } from './index-0074586c.js';
90
+ export { g as getSerializers } from './index-5f2c18b9.js';
90
91
  export { default as Beam } from './Beam.js';
91
92
  export { default as Segment } from './Segment.js';
92
93
  export { default as KMTracker } from './KMTracker.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.967",
3
+ "version": "1.0.968",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",