@mjhls/mjh-framework 1.0.966-testV2 → 1.0.966-testV4

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-200d270d.js → MediaSeriesCard-94ff4d11.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-eb1c583d.js} +11 -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-0f93cf68.js → MediaSeriesCard-4f07fac6.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-264bbd3c.js} +11 -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.969
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-eb1c583d.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-eb1c583d.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-eb1c583d.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-eb1c583d.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-eb1c583d.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-200d270d.js');
8
+ var MediaSeriesCard = require('./MediaSeriesCard-94ff4d11.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-eb1c583d.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-200d270d.js');
8
+ var MediaSeriesCard = require('./MediaSeriesCard-94ff4d11.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-eb1c583d.js');
15
15
  require('./_commonjsHelpers-06173234.js');
16
16
  require('./core.get-iterator-method-5643aa10.js');
17
17
  require('./web.dom.iterable-d98303e0.js');
@@ -423,7 +423,7 @@ MediaSeriesLanding.getInitialData = function () {
423
423
  itemsPerPage: itemsPerPage
424
424
  };
425
425
  _context2.next = 9;
426
- return client.fetch('*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id, \n isGated,\n name,\n description\n }');
426
+ return client.fetch('*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id, \n isGated,\n name,\n description,\n pixelTrackingCode->\n }');
427
427
 
428
428
  case 9:
429
429
  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-eb1c583d.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-eb1c583d.js');
17
17
  var BlockContent = require('./BlockContent-9ebd251f.js');
18
18
  require('./_commonjsHelpers-06173234.js');
19
19
  require('./core.get-iterator-method-5643aa10.js');
@@ -245,14 +245,14 @@ PartnerDetails.returnGetInitialProps = function () {
245
245
  switch (_context.prev = _context.next) {
246
246
  case 0:
247
247
  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 }';
248
- 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 }';
248
+ 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 }';
249
249
 
250
250
 
251
251
  if (category) {
252
252
  // if partners page has a sub category such as onclive
253
253
  // e.g. /sap-partner/[category]/[partner]
254
254
 
255
- 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 }';
255
+ 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 }';
256
256
  }
257
257
 
258
258
  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-eb1c583d.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-eb1c583d.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-eb1c583d.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 _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
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');
@@ -676,7 +677,7 @@ var Recommended = function Recommended(props) {
676
677
 
677
678
  return React__default['default'].createElement(
678
679
  'div',
679
- { id: 'recommended' },
680
+ { id: 'recommended', style: { minHeight: '150px' } },
680
681
  loaded === 'loaded' && React__default['default'].createElement(
681
682
  React__default['default'].Fragment,
682
683
  null,
@@ -1209,7 +1210,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
1209
1210
  return null;
1210
1211
  };
1211
1212
 
1212
- var RelatedContent = function RelatedContent() {
1213
+ var RelatedContent = React__default['default'].memo(function () {
1213
1214
  return React__default['default'].createElement(
1214
1215
  'div',
1215
1216
  null,
@@ -1245,7 +1246,7 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
1245
1246
  )
1246
1247
  )
1247
1248
  );
1248
- };
1249
+ });
1249
1250
 
1250
1251
  var form = function form() {
1251
1252
  return React__default['default'].createElement(
@@ -1585,7 +1586,8 @@ var Article = React__default['default'].memo(React.forwardRef(function (props, r
1585
1586
  } },
1586
1587
  React__default['default'].createElement(
1587
1588
  'div',
1588
- { id: 'article__block', ref: ref },
1589
+ { id: 'article__block', style: { position: 'relative' }, ref: ref },
1590
+ React__default['default'].createElement(PixelTracking.PixelTrackingArticle, { article: article, infiniteScroll: props.infiniteScroll }),
1589
1591
  React__default['default'].createElement(
1590
1592
  'div',
1591
1593
  { 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-eb1c583d.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({
@@ -10382,6 +10382,15 @@ var BlockTable = function BlockTable(props) {
10382
10382
  );
10383
10383
  };
10384
10384
 
10385
+ var DigiohSmartTag = function DigiohSmartTag(props) {
10386
+ var _props$node = props.node,
10387
+ FormID = _props$node.FormID;
10388
+ _props$node.needSegmentSupport;
10389
+
10390
+
10391
+ return React__default['default'].createElement('div', { id: FormID });
10392
+ };
10393
+
10385
10394
  var ScrollToElement = function ScrollToElement(elementId) {
10386
10395
  var element = document.getElementById(elementId);
10387
10396
  if (element) {
@@ -10600,6 +10609,7 @@ var getSerializers = function getSerializers() {
10600
10609
  return React__default['default'].createElement(Formstack, { FormID: FormID, Caption: Caption, needSegmentSupport: needSegmentSupport });
10601
10610
  },
10602
10611
  formassembly: FormAssembly,
10612
+ digiohSmartTag: DigiohSmartTag,
10603
10613
  multimedia: function multimedia(_ref21) {
10604
10614
  var node = _ref21.node;
10605
10615
 
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-eb1c583d.js');
93
94
  var Beam = require('./Beam.js');
94
95
  var Segment = require('./Segment.js');
95
96
  var KMTracker = require('./KMTracker.js');
@@ -611,6 +612,8 @@ exports.ArticleCarousel = ArticleCarousel;
611
612
  exports.TaxonomyDescription = TaxonomyDescription;
612
613
  exports.PubToc = PubToc;
613
614
  exports.PubSection = PubSection;
615
+ exports.PixelTrackingArticle = PixelTracking.PixelTrackingArticle;
616
+ exports.PixelTrackingLandingPages = PixelTracking.PixelTrackingLandingPages;
614
617
  exports.ForbesHero = ForbesHero;
615
618
  exports.HorizontalHero = HorizontalHero;
616
619
  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-264bbd3c.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-264bbd3c.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-264bbd3c.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-264bbd3c.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-264bbd3c.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-0f93cf68.js';
6
+ import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-4f07fac6.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-264bbd3c.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-0f93cf68.js';
6
+ import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-4f07fac6.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-264bbd3c.js';
13
13
  import './_commonjsHelpers-0c4b6f40.js';
14
14
  import './core.get-iterator-method-ea258bb1.js';
15
15
  import './web.dom.iterable-ab4dea5c.js';
@@ -416,7 +416,7 @@ MediaSeriesLanding.getInitialData = function () {
416
416
  itemsPerPage: itemsPerPage
417
417
  };
418
418
  _context2.next = 9;
419
- return client.fetch('*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id, \n isGated,\n name,\n description\n }');
419
+ return client.fetch('*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id, \n isGated,\n name,\n description,\n pixelTrackingCode->\n }');
420
420
 
421
421
  case 9:
422
422
  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-264bbd3c.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-264bbd3c.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 description,\n name,\n identifier,\n thumbnail{ ..., asset-> },\n twitter,\n facebook,\n linkedin,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n }';
242
+ 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 }';
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 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 }';
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 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 }';
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 }';
@@ -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-264bbd3c.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-264bbd3c.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-264bbd3c.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 { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
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';
@@ -666,7 +667,7 @@ var Recommended = function Recommended(props) {
666
667
 
667
668
  return React__default.createElement(
668
669
  'div',
669
- { id: 'recommended' },
670
+ { id: 'recommended', style: { minHeight: '150px' } },
670
671
  loaded === 'loaded' && React__default.createElement(
671
672
  React__default.Fragment,
672
673
  null,
@@ -1199,7 +1200,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
1199
1200
  return null;
1200
1201
  };
1201
1202
 
1202
- var RelatedContent = function RelatedContent() {
1203
+ var RelatedContent = React__default.memo(function () {
1203
1204
  return React__default.createElement(
1204
1205
  'div',
1205
1206
  null,
@@ -1235,7 +1236,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
1235
1236
  )
1236
1237
  )
1237
1238
  );
1238
- };
1239
+ });
1239
1240
 
1240
1241
  var form = function form() {
1241
1242
  return React__default.createElement(
@@ -1575,7 +1576,8 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
1575
1576
  } },
1576
1577
  React__default.createElement(
1577
1578
  'div',
1578
- { id: 'article__block', ref: ref },
1579
+ { id: 'article__block', style: { position: 'relative' }, ref: ref },
1580
+ React__default.createElement(PixelTrackingArticle, { article: article, infiniteScroll: props.infiniteScroll }),
1579
1581
  React__default.createElement(
1580
1582
  'div',
1581
1583
  { 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-264bbd3c.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({
@@ -10362,6 +10362,15 @@ 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
+
10365
10374
  var ScrollToElement = function ScrollToElement(elementId) {
10366
10375
  var element = document.getElementById(elementId);
10367
10376
  if (element) {
@@ -10580,6 +10589,7 @@ var getSerializers = function getSerializers() {
10580
10589
  return React__default.createElement(Formstack, { FormID: FormID, Caption: Caption, needSegmentSupport: needSegmentSupport });
10581
10590
  },
10582
10591
  formassembly: FormAssembly,
10592
+ digiohSmartTag: DigiohSmartTag,
10583
10593
  multimedia: function multimedia(_ref21) {
10584
10594
  var node = _ref21.node;
10585
10595
 
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-264bbd3c.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.966-testV2",
3
+ "version": "1.0.966-testV4",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",