@mjhls/mjh-framework 1.0.966-test-D4S-1873 → 1.0.966-testV2

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,11 +1,11 @@
1
- # mjh-framework v. 1.0.966
1
+ # mjh-framework v. 1.0.967
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
5
  ## Install
6
6
 
7
7
  ```bash
8
- npm install --save @mjhls/mjh-framework
8
+ npm install --save @mjhls/mjh-framework
9
9
  ```
10
10
 
11
11
  ## Usage
package/dist/cjs/View.js CHANGED
@@ -2128,9 +2128,9 @@ var ArticleQueue = function ArticleQueue(props) {
2128
2128
  changeMeta(meta);
2129
2129
  }
2130
2130
  if (props.setCustomDimensions) {
2131
- props.setCustomDimensions(activeArticle, '200', prevUrl);
2131
+ props.setCustomDimensions(true, activeArticle, '200', prevUrl);
2132
2132
  }
2133
- if (props.pageview) props.pageview(newPath, null, pageviewProperties);
2133
+ // if (props.pageview) props.pageview(newPath, pageviewProperties)
2134
2134
  refreshAD(path);
2135
2135
  };
2136
2136
 
@@ -2198,13 +2198,12 @@ var View = function View(props) {
2198
2198
  React.useEffect(function () {
2199
2199
  if (pageview && setCustomDimensions) {
2200
2200
  var timer = void 0;
2201
- var pageviewProperties = _extends._extends({}, getTargeting.getTargeting(props), {
2201
+ _extends._extends({}, getTargeting.getTargeting(props), {
2202
2202
  category: article && article.category ? article.category.name : ''
2203
2203
  });
2204
2204
  var waitAndExicute = function waitAndExicute() {
2205
2205
  if (typeof window.GA_INITIALIZED !== 'undefined') {
2206
- setCustomDimensions(article, statusCode, prevUrl);
2207
- pageview(router.asPath, null, pageviewProperties);
2206
+ setCustomDimensions(false, article, statusCode, prevUrl);
2208
2207
  } else timer = setTimeout(waitAndExicute, 1000);
2209
2208
  };
2210
2209
  waitAndExicute();
@@ -2215,7 +2214,7 @@ var View = function View(props) {
2215
2214
  }, []);
2216
2215
 
2217
2216
  var isVideoSeries = false;
2218
- //check for certain serializers that need to disable infinite scroll
2217
+ // check for certain serializers that need to disable infinite scroll
2219
2218
  var checkBodyForDisableInfiniteScroll = function checkBodyForDisableInfiniteScroll(article) {
2220
2219
  if (!article || !article.body) {
2221
2220
  return false;
@@ -2352,7 +2351,7 @@ var View = function View(props) {
2352
2351
  );
2353
2352
  };
2354
2353
 
2355
- //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
+ // 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.
2356
2355
  View.returnGetInitialProps = function () {
2357
2356
  var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(url, prevUrl, seriesVid, client, sao) {
2358
2357
  var context = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
@@ -2425,7 +2424,7 @@ View.returnGetInitialProps = function () {
2425
2424
  });
2426
2425
  }
2427
2426
  sponsoredFlag = false;
2428
- //check for disableAds flag on each taxonomoy
2427
+ // check for disableAds flag on each taxonomoy
2429
2428
 
2430
2429
  if (article && article.content_placement) {
2431
2430
  article.content_placement.forEach(function (x) {
@@ -2434,7 +2433,7 @@ View.returnGetInitialProps = function () {
2434
2433
  }
2435
2434
  });
2436
2435
  }
2437
- //check for disableAds flag on content category
2436
+ // check for disableAds flag on content category
2438
2437
  if (article.category && article.category.disableAds) {
2439
2438
  sponsoredFlag = true;
2440
2439
  }
package/dist/esm/View.js CHANGED
@@ -2118,9 +2118,9 @@ var ArticleQueue = function ArticleQueue(props) {
2118
2118
  changeMeta(meta);
2119
2119
  }
2120
2120
  if (props.setCustomDimensions) {
2121
- props.setCustomDimensions(activeArticle, '200', prevUrl);
2121
+ props.setCustomDimensions(true, activeArticle, '200', prevUrl);
2122
2122
  }
2123
- if (props.pageview) props.pageview(newPath, null, pageviewProperties);
2123
+ // if (props.pageview) props.pageview(newPath, pageviewProperties)
2124
2124
  refreshAD(path);
2125
2125
  };
2126
2126
 
@@ -2188,13 +2188,12 @@ var View = function View(props) {
2188
2188
  useEffect(function () {
2189
2189
  if (pageview && setCustomDimensions) {
2190
2190
  var timer = void 0;
2191
- var pageviewProperties = _extends({}, getTargeting(props), {
2191
+ _extends({}, getTargeting(props), {
2192
2192
  category: article && article.category ? article.category.name : ''
2193
2193
  });
2194
2194
  var waitAndExicute = function waitAndExicute() {
2195
2195
  if (typeof window.GA_INITIALIZED !== 'undefined') {
2196
- setCustomDimensions(article, statusCode, prevUrl);
2197
- pageview(router.asPath, null, pageviewProperties);
2196
+ setCustomDimensions(false, article, statusCode, prevUrl);
2198
2197
  } else timer = setTimeout(waitAndExicute, 1000);
2199
2198
  };
2200
2199
  waitAndExicute();
@@ -2205,7 +2204,7 @@ var View = function View(props) {
2205
2204
  }, []);
2206
2205
 
2207
2206
  var isVideoSeries = false;
2208
- //check for certain serializers that need to disable infinite scroll
2207
+ // check for certain serializers that need to disable infinite scroll
2209
2208
  var checkBodyForDisableInfiniteScroll = function checkBodyForDisableInfiniteScroll(article) {
2210
2209
  if (!article || !article.body) {
2211
2210
  return false;
@@ -2342,7 +2341,7 @@ var View = function View(props) {
2342
2341
  );
2343
2342
  };
2344
2343
 
2345
- //This should be called in /view/[url] getInitialProps to fetch the article data and related articles. This will also set the sponsoredFlag to true if any taxonomies have disabled ads.
2344
+ // 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.
2346
2345
  View.returnGetInitialProps = function () {
2347
2346
  var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(url, prevUrl, seriesVid, client, sao) {
2348
2347
  var context = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
@@ -2415,7 +2414,7 @@ View.returnGetInitialProps = function () {
2415
2414
  });
2416
2415
  }
2417
2416
  sponsoredFlag = false;
2418
- //check for disableAds flag on each taxonomoy
2417
+ // check for disableAds flag on each taxonomoy
2419
2418
 
2420
2419
  if (article && article.content_placement) {
2421
2420
  article.content_placement.forEach(function (x) {
@@ -2424,7 +2423,7 @@ View.returnGetInitialProps = function () {
2424
2423
  }
2425
2424
  });
2426
2425
  }
2427
- //check for disableAds flag on content category
2426
+ // check for disableAds flag on content category
2428
2427
  if (article.category && article.category.disableAds) {
2429
2428
  sponsoredFlag = true;
2430
2429
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.966-test-D4S-1873",
3
+ "version": "1.0.966-testV2",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",