@mjhls/mjh-framework 1.0.969 → 1.0.971-disable

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # mjh-framework v. 1.0.969
1
+ # mjh-framework v. 1.0.971
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
 
@@ -151,11 +151,11 @@ var PartnerDetails = function PartnerDetails(_ref) {
151
151
  { jsx: 'true' },
152
152
  '\n @media screen and (max-width: 768px) {\n .partners-logo {\n width: 100%;\n min-width: 100%;\n }\n .partner-logo-wrap {\n flex-wrap: wrap;\n }\n .block-content-partners {\n padding-left: 0 !important;\n }\n }\n '
153
153
  ),
154
- (partnerDetails.description || partnerDetails.linkedin || partnerDetails.instagram || partnerDetails.youtube || partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default['default'].createElement(
154
+ (partnerDetails.description || partnerDetails.linkedin || partnerDetails.instagram || partnerDetails.youtube && partnerDetails.youtubeIcon || partnerDetails.twitter && partnerDetails.twitterIcon || partnerDetails.facebook && !partnerDetails.twitterIcon) && React__default['default'].createElement(
155
155
  'div',
156
156
  { className: 'block-content-partners my-4', style: { maxWidth: '100%', paddingLeft: '2rem', flex: '1 1 auto' } },
157
157
  partnerDetails.description && React__default['default'].createElement(BlockContent.BlockContent, _extends._extends({ serializers: getSerializers.getSerializers(client), blocks: description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config())),
158
- (partnerDetails.linkedin || partnerDetails.instagram || partnerDetails.youtube || partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default['default'].createElement(
158
+ (partnerDetails.linkedin || partnerDetails.instagram || partnerDetails.youtube && partnerDetails.youtubeIcon || partnerDetails.twitter && partnerDetails.twitterIcon || partnerDetails.facebook && !partnerDetails.twitterIcon) && React__default['default'].createElement(
159
159
  'div',
160
160
  null,
161
161
  React__default['default'].createElement(
@@ -176,8 +176,24 @@ var PartnerDetails = function PartnerDetails(_ref) {
176
176
  rel: 'noopener noreferrer',
177
177
  style: { height: 30, width: 30 }
178
178
  }),
179
- partnerDetails.youtube && partnerDetails.youtubeIcon && React__default['default'].createElement(reactSocialIcons.reactSocialIcons_1, { url: partnerDetails.youtube, target: '_blank', rel: 'noopener noreferrer', style: { height: 30, width: 30, marginLeft: '0.25rem' } }),
180
- (partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && (partnerDetails.twitterIcon ? React__default['default'].createElement(reactSocialIcons.reactSocialIcons_1, { url: partnerDetails.twitter, target: '_blank', rel: 'noopener noreferrer', style: { height: 30, width: 30, marginLeft: '0.25rem' } }) : React__default['default'].createElement(reactSocialIcons.reactSocialIcons_1, { url: partnerDetails.facebook, target: '_blank', rel: 'noopener noreferrer', style: { height: 30, width: 30, marginLeft: '0.25rem' } }))
179
+ partnerDetails.youtube && partnerDetails.youtubeIcon && React__default['default'].createElement(reactSocialIcons.reactSocialIcons_1, {
180
+ url: partnerDetails.youtube,
181
+ target: '_blank',
182
+ rel: 'noopener noreferrer',
183
+ style: { height: 30, width: 30, marginLeft: '0.25rem' }
184
+ }),
185
+ partnerDetails.twitter && partnerDetails.twitterIcon && React__default['default'].createElement(reactSocialIcons.reactSocialIcons_1, {
186
+ url: partnerDetails.twitter,
187
+ target: '_blank',
188
+ rel: 'noopener noreferrer',
189
+ style: { height: 30, width: 30, marginLeft: '0.25rem' }
190
+ }),
191
+ partnerDetails.facebook && !partnerDetails.twitterIcon && React__default['default'].createElement(reactSocialIcons.reactSocialIcons_1, {
192
+ url: partnerDetails.facebook,
193
+ target: '_blank',
194
+ rel: 'noopener noreferrer',
195
+ style: { height: 30, width: 30, marginLeft: '0.25rem' }
196
+ })
181
197
  )
182
198
  )
183
199
  ),
@@ -260,7 +276,7 @@ PartnerDetails.returnGetInitialProps = function () {
260
276
  // if partners page has a sub category such as onclive
261
277
  // e.g. /sap-partner/[category]/[partner]
262
278
 
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 }';
279
+ 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 instagram,\n twitterIcon,\n youtube,\n youtubeIcon,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n \n }\n }';
264
280
  }
265
281
 
266
282
  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 }';
package/dist/cjs/View.js CHANGED
@@ -2126,9 +2126,10 @@ var ArticleQueue = function ArticleQueue(props) {
2126
2126
  changeMeta(meta);
2127
2127
  }
2128
2128
  if (props.setCustomDimensions) {
2129
- props.setCustomDimensions(activeArticle, '200', prevUrl);
2129
+ props.setCustomDimensions(activeArticle, '200', prevUrl, '');
2130
2130
  }
2131
2131
  if (props.pageview) props.pageview(newPath, null, pageviewProperties);
2132
+ if (props.gtagSetCustomDimensions) props.gtagSetCustomDimensions(activeArticle, '200', prevUrl, '', true);
2132
2133
  refreshAD(path);
2133
2134
  };
2134
2135
 
@@ -2170,6 +2171,7 @@ var View = function View(props) {
2170
2171
  props.sponsoredTaxonomies;
2171
2172
  var Ads = props.Ads,
2172
2173
  setCustomDimensions = props.setCustomDimensions,
2174
+ gtagSetCustomDimensions = props.gtagSetCustomDimensions,
2173
2175
  statusCode = props.statusCode,
2174
2176
  prevUrl = props.prevUrl,
2175
2177
  pageview = props.pageview,
@@ -2201,7 +2203,7 @@ var View = function View(props) {
2201
2203
  });
2202
2204
  var waitAndExicute = function waitAndExicute() {
2203
2205
  if (typeof window.GA_INITIALIZED !== 'undefined') {
2204
- setCustomDimensions(article, statusCode, prevUrl);
2206
+ setCustomDimensions(article, statusCode, prevUrl, '');
2205
2207
  pageview(router.asPath, null, pageviewProperties);
2206
2208
  } else timer = setTimeout(waitAndExicute, 1000);
2207
2209
  };
@@ -2209,34 +2211,26 @@ var View = function View(props) {
2209
2211
  return function () {
2210
2212
  clearTimeout(timer);
2211
2213
  };
2214
+ } else if (gtagSetCustomDimensions) {
2215
+ var _timer = void 0;
2216
+ var _waitAndExicute = function _waitAndExicute() {
2217
+ if (typeof window.GA_INITIALIZED !== 'undefined') {
2218
+ gtagSetCustomDimensions(article, statusCode, prevUrl, '', false);
2219
+ } else _timer = setTimeout(_waitAndExicute, 1000);
2220
+ };
2221
+ _waitAndExicute();
2222
+ return function () {
2223
+ clearTimeout(_timer);
2224
+ };
2212
2225
  }
2213
2226
  }, []);
2214
2227
 
2215
- var isVideoSeries = false;
2216
- //check for certain serializers that need to disable infinite scroll
2217
- var checkBodyForDisableInfiniteScroll = function checkBodyForDisableInfiniteScroll(article) {
2218
- if (!article || !article.body) {
2219
- return false;
2220
- }
2221
- for (var i = 0; i < article.body.length; i++) {
2222
- if (article.body[i]._type === 'articleSeries' || article.body[i]._type === 'slideshows' || article.body[i]._type === 'quiz') {
2223
- return true;
2224
- }
2225
- var row = article.body[i];
2226
- if (typeof row.videos !== 'undefined') {
2227
- isVideoSeries = true;
2228
- return true;
2229
- }
2230
- }
2231
- return false;
2232
- };
2233
-
2234
- var disableInfiniteScroll = checkBodyForDisableInfiniteScroll(props.article);
2228
+ //const disableInfiniteScroll = checkBodyForDisableInfiniteScroll(props.article)
2235
2229
  var commentsEnabledInTaxonomy = Array.isArray(content_placement) && content_placement.some(function (t) {
2236
2230
  return t.showComments === true;
2237
2231
  });
2238
2232
  var showDisqus = commentsEnabledInTaxonomy || hideComments === false;
2239
- var needInfiniteScroll = ['Articles', 'Videos', 'Podcasts'].includes(article.category.name) && article.taxonomyMapping && article.passwordLock !== true && !disableInfiniteScroll && !article.ExcludeFromInfiniteScroll && !sponsoredFlag && infiniteScrollFlag && !article.showIsi && (!article.documentGroup || !article.documentGroup.isSeries) && !showDisqus;
2233
+ var needInfiniteScroll = ['Articles', 'Videos', 'Podcasts'].includes(article.category.name) && article.taxonomyMapping && article.passwordLock !== true && !disableInfiniteScroll && !article.ExcludeFromInfiniteScroll && !sponsoredFlag && infiniteScrollFlag && !article.showIsi && !showDisqus;
2240
2234
 
2241
2235
  if (['Articles', 'Videos', 'Podcasts'].includes(article.category.name)) {
2242
2236
  title = null;
@@ -2271,10 +2265,6 @@ var View = function View(props) {
2271
2265
 
2272
2266
  var meta_description = seriesShareOptions && seriesShareOptions.seriesSummary ? '' + seriesShareOptions.seriesSummary + (currentPage > 0 ? ' | Page ' + currentPage : '') : article.seo && article.seo.meta_description ? '' + article.seo.meta_description + (currentPage > 0 ? ' | Page ' + currentPage : '') : shareOptions.shareSummary ? '' + shareOptions.shareSummary + (currentPage > 0 ? ' | Page ' + currentPage : '') : '' + (currentPage > 0 ? 'Page ' + currentPage : '');
2273
2267
 
2274
- if (isVideoSeries) {
2275
- meta_description = seriesShareOptions && seriesShareOptions.seriesSummary ? '' + seriesShareOptions.seriesSummary + (currentPage > 0 ? ' | Page ' + currentPage : '') : '';
2276
- }
2277
-
2278
2268
  var currentPath = router && router.asPath;
2279
2269
  var seoLinks = props.cache.seoManager && props.cache.seoManager.filter(function (eachDocument) {
2280
2270
  return eachDocument.urlSeo == currentPath;
@@ -2350,7 +2340,7 @@ var View = function View(props) {
2350
2340
  );
2351
2341
  };
2352
2342
 
2353
- //This should be called in /view/[url] getInitialProps to fetch the article data and related articles. This will also set the sponsoredFlag to true if any taxonomies have disabled ads.
2343
+ // This should be called in /view/[url] getInitialProps to fetch the article data and related articles. This will also set the sponsoredFlag to true if any taxonomies have disabled ads.
2354
2344
  View.returnGetInitialProps = function () {
2355
2345
  var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(url, prevUrl, seriesVid, client, sao) {
2356
2346
  var context = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
@@ -2423,7 +2413,7 @@ View.returnGetInitialProps = function () {
2423
2413
  });
2424
2414
  }
2425
2415
  sponsoredFlag = false;
2426
- //check for disableAds flag on each taxonomoy
2416
+ // check for disableAds flag on each taxonomoy
2427
2417
 
2428
2418
  if (article && article.content_placement) {
2429
2419
  article.content_placement.forEach(function (x) {
@@ -2432,7 +2422,7 @@ View.returnGetInitialProps = function () {
2432
2422
  }
2433
2423
  });
2434
2424
  }
2435
- //check for disableAds flag on content category
2425
+ // check for disableAds flag on content category
2436
2426
  if (article.category && article.category.disableAds) {
2437
2427
  sponsoredFlag = true;
2438
2428
  }
@@ -11,7 +11,7 @@ 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 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 }';
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 \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
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':
@@ -145,11 +145,11 @@ var PartnerDetails = function PartnerDetails(_ref) {
145
145
  { jsx: 'true' },
146
146
  '\n @media screen and (max-width: 768px) {\n .partners-logo {\n width: 100%;\n min-width: 100%;\n }\n .partner-logo-wrap {\n flex-wrap: wrap;\n }\n .block-content-partners {\n padding-left: 0 !important;\n }\n }\n '
147
147
  ),
148
- (partnerDetails.description || partnerDetails.linkedin || partnerDetails.instagram || partnerDetails.youtube || partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default.createElement(
148
+ (partnerDetails.description || partnerDetails.linkedin || partnerDetails.instagram || partnerDetails.youtube && partnerDetails.youtubeIcon || partnerDetails.twitter && partnerDetails.twitterIcon || partnerDetails.facebook && !partnerDetails.twitterIcon) && React__default.createElement(
149
149
  'div',
150
150
  { className: 'block-content-partners my-4', style: { maxWidth: '100%', paddingLeft: '2rem', flex: '1 1 auto' } },
151
151
  partnerDetails.description && React__default.createElement(BlockContent, _extends({ serializers: getSerializers(client), blocks: description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config())),
152
- (partnerDetails.linkedin || partnerDetails.instagram || partnerDetails.youtube || partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default.createElement(
152
+ (partnerDetails.linkedin || partnerDetails.instagram || partnerDetails.youtube && partnerDetails.youtubeIcon || partnerDetails.twitter && partnerDetails.twitterIcon || partnerDetails.facebook && !partnerDetails.twitterIcon) && React__default.createElement(
153
153
  'div',
154
154
  null,
155
155
  React__default.createElement(
@@ -170,8 +170,24 @@ var PartnerDetails = function PartnerDetails(_ref) {
170
170
  rel: 'noopener noreferrer',
171
171
  style: { height: 30, width: 30 }
172
172
  }),
173
- partnerDetails.youtube && partnerDetails.youtubeIcon && React__default.createElement(reactSocialIcons_1, { url: partnerDetails.youtube, target: '_blank', rel: 'noopener noreferrer', style: { height: 30, width: 30, marginLeft: '0.25rem' } }),
174
- (partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && (partnerDetails.twitterIcon ? React__default.createElement(reactSocialIcons_1, { url: partnerDetails.twitter, target: '_blank', rel: 'noopener noreferrer', style: { height: 30, width: 30, marginLeft: '0.25rem' } }) : React__default.createElement(reactSocialIcons_1, { url: partnerDetails.facebook, target: '_blank', rel: 'noopener noreferrer', style: { height: 30, width: 30, marginLeft: '0.25rem' } }))
173
+ partnerDetails.youtube && partnerDetails.youtubeIcon && React__default.createElement(reactSocialIcons_1, {
174
+ url: partnerDetails.youtube,
175
+ target: '_blank',
176
+ rel: 'noopener noreferrer',
177
+ style: { height: 30, width: 30, marginLeft: '0.25rem' }
178
+ }),
179
+ partnerDetails.twitter && partnerDetails.twitterIcon && React__default.createElement(reactSocialIcons_1, {
180
+ url: partnerDetails.twitter,
181
+ target: '_blank',
182
+ rel: 'noopener noreferrer',
183
+ style: { height: 30, width: 30, marginLeft: '0.25rem' }
184
+ }),
185
+ partnerDetails.facebook && !partnerDetails.twitterIcon && React__default.createElement(reactSocialIcons_1, {
186
+ url: partnerDetails.facebook,
187
+ target: '_blank',
188
+ rel: 'noopener noreferrer',
189
+ style: { height: 30, width: 30, marginLeft: '0.25rem' }
190
+ })
175
191
  )
176
192
  )
177
193
  ),
@@ -254,7 +270,7 @@ PartnerDetails.returnGetInitialProps = function () {
254
270
  // if partners page has a sub category such as onclive
255
271
  // e.g. /sap-partner/[category]/[partner]
256
272
 
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 }';
273
+ partnerQuery = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')] [0] {\n ...,\n \'partner\': *[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\' && references(^._id)] [0] {\n 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 \n }\n }';
258
274
  }
259
275
 
260
276
  taxonomyQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && isShow != false\n && identifier.current == \'' + identifier + '\'] [0] {\n \'id\': _id,\n \'title\': name\n }';
package/dist/esm/View.js CHANGED
@@ -2115,9 +2115,10 @@ var ArticleQueue = function ArticleQueue(props) {
2115
2115
  changeMeta(meta);
2116
2116
  }
2117
2117
  if (props.setCustomDimensions) {
2118
- props.setCustomDimensions(activeArticle, '200', prevUrl);
2118
+ props.setCustomDimensions(activeArticle, '200', prevUrl, '');
2119
2119
  }
2120
2120
  if (props.pageview) props.pageview(newPath, null, pageviewProperties);
2121
+ if (props.gtagSetCustomDimensions) props.gtagSetCustomDimensions(activeArticle, '200', prevUrl, '', true);
2121
2122
  refreshAD(path);
2122
2123
  };
2123
2124
 
@@ -2159,6 +2160,7 @@ var View = function View(props) {
2159
2160
  props.sponsoredTaxonomies;
2160
2161
  var Ads = props.Ads,
2161
2162
  setCustomDimensions = props.setCustomDimensions,
2163
+ gtagSetCustomDimensions = props.gtagSetCustomDimensions,
2162
2164
  statusCode = props.statusCode,
2163
2165
  prevUrl = props.prevUrl,
2164
2166
  pageview = props.pageview,
@@ -2190,7 +2192,7 @@ var View = function View(props) {
2190
2192
  });
2191
2193
  var waitAndExicute = function waitAndExicute() {
2192
2194
  if (typeof window.GA_INITIALIZED !== 'undefined') {
2193
- setCustomDimensions(article, statusCode, prevUrl);
2195
+ setCustomDimensions(article, statusCode, prevUrl, '');
2194
2196
  pageview(router.asPath, null, pageviewProperties);
2195
2197
  } else timer = setTimeout(waitAndExicute, 1000);
2196
2198
  };
@@ -2198,34 +2200,26 @@ var View = function View(props) {
2198
2200
  return function () {
2199
2201
  clearTimeout(timer);
2200
2202
  };
2203
+ } else if (gtagSetCustomDimensions) {
2204
+ var _timer = void 0;
2205
+ var _waitAndExicute = function _waitAndExicute() {
2206
+ if (typeof window.GA_INITIALIZED !== 'undefined') {
2207
+ gtagSetCustomDimensions(article, statusCode, prevUrl, '', false);
2208
+ } else _timer = setTimeout(_waitAndExicute, 1000);
2209
+ };
2210
+ _waitAndExicute();
2211
+ return function () {
2212
+ clearTimeout(_timer);
2213
+ };
2201
2214
  }
2202
2215
  }, []);
2203
2216
 
2204
- var isVideoSeries = false;
2205
- //check for certain serializers that need to disable infinite scroll
2206
- var checkBodyForDisableInfiniteScroll = function checkBodyForDisableInfiniteScroll(article) {
2207
- if (!article || !article.body) {
2208
- return false;
2209
- }
2210
- for (var i = 0; i < article.body.length; i++) {
2211
- if (article.body[i]._type === 'articleSeries' || article.body[i]._type === 'slideshows' || article.body[i]._type === 'quiz') {
2212
- return true;
2213
- }
2214
- var row = article.body[i];
2215
- if (typeof row.videos !== 'undefined') {
2216
- isVideoSeries = true;
2217
- return true;
2218
- }
2219
- }
2220
- return false;
2221
- };
2222
-
2223
- var disableInfiniteScroll = checkBodyForDisableInfiniteScroll(props.article);
2217
+ //const disableInfiniteScroll = checkBodyForDisableInfiniteScroll(props.article)
2224
2218
  var commentsEnabledInTaxonomy = Array.isArray(content_placement) && content_placement.some(function (t) {
2225
2219
  return t.showComments === true;
2226
2220
  });
2227
2221
  var showDisqus = commentsEnabledInTaxonomy || hideComments === false;
2228
- var needInfiniteScroll = ['Articles', 'Videos', 'Podcasts'].includes(article.category.name) && article.taxonomyMapping && article.passwordLock !== true && !disableInfiniteScroll && !article.ExcludeFromInfiniteScroll && !sponsoredFlag && infiniteScrollFlag && !article.showIsi && (!article.documentGroup || !article.documentGroup.isSeries) && !showDisqus;
2222
+ var needInfiniteScroll = ['Articles', 'Videos', 'Podcasts'].includes(article.category.name) && article.taxonomyMapping && article.passwordLock !== true && !disableInfiniteScroll && !article.ExcludeFromInfiniteScroll && !sponsoredFlag && infiniteScrollFlag && !article.showIsi && !showDisqus;
2229
2223
 
2230
2224
  if (['Articles', 'Videos', 'Podcasts'].includes(article.category.name)) {
2231
2225
  title = null;
@@ -2260,10 +2254,6 @@ var View = function View(props) {
2260
2254
 
2261
2255
  var meta_description = seriesShareOptions && seriesShareOptions.seriesSummary ? '' + seriesShareOptions.seriesSummary + (currentPage > 0 ? ' | Page ' + currentPage : '') : article.seo && article.seo.meta_description ? '' + article.seo.meta_description + (currentPage > 0 ? ' | Page ' + currentPage : '') : shareOptions.shareSummary ? '' + shareOptions.shareSummary + (currentPage > 0 ? ' | Page ' + currentPage : '') : '' + (currentPage > 0 ? 'Page ' + currentPage : '');
2262
2256
 
2263
- if (isVideoSeries) {
2264
- meta_description = seriesShareOptions && seriesShareOptions.seriesSummary ? '' + seriesShareOptions.seriesSummary + (currentPage > 0 ? ' | Page ' + currentPage : '') : '';
2265
- }
2266
-
2267
2257
  var currentPath = router && router.asPath;
2268
2258
  var seoLinks = props.cache.seoManager && props.cache.seoManager.filter(function (eachDocument) {
2269
2259
  return eachDocument.urlSeo == currentPath;
@@ -2339,7 +2329,7 @@ var View = function View(props) {
2339
2329
  );
2340
2330
  };
2341
2331
 
2342
- //This should be called in /view/[url] getInitialProps to fetch the article data and related articles. This will also set the sponsoredFlag to true if any taxonomies have disabled ads.
2332
+ // This should be called in /view/[url] getInitialProps to fetch the article data and related articles. This will also set the sponsoredFlag to true if any taxonomies have disabled ads.
2343
2333
  View.returnGetInitialProps = function () {
2344
2334
  var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(url, prevUrl, seriesVid, client, sao) {
2345
2335
  var context = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
@@ -2412,7 +2402,7 @@ View.returnGetInitialProps = function () {
2412
2402
  });
2413
2403
  }
2414
2404
  sponsoredFlag = false;
2415
- //check for disableAds flag on each taxonomoy
2405
+ // check for disableAds flag on each taxonomoy
2416
2406
 
2417
2407
  if (article && article.content_placement) {
2418
2408
  article.content_placement.forEach(function (x) {
@@ -2421,7 +2411,7 @@ View.returnGetInitialProps = function () {
2421
2411
  }
2422
2412
  });
2423
2413
  }
2424
- //check for disableAds flag on content category
2414
+ // check for disableAds flag on content category
2425
2415
  if (article.category && article.category.disableAds) {
2426
2416
  sponsoredFlag = true;
2427
2417
  }
@@ -9,7 +9,7 @@ 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 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 }';
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 \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
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':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.969",
3
+ "version": "1.0.971-disable",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",