@mjhls/mjh-framework 1.0.442 → 1.0.443

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,5 +1,5 @@
1
1
 
2
- # mjh-framework v. 1.0.442
2
+ # mjh-framework v. 1.0.443
3
3
 
4
4
  > Foundation Framework
5
5
 
@@ -108,6 +108,16 @@ var GridContent = function (_React$Component) {
108
108
  if (prevState.currentPage !== _this.state.currentPage) {
109
109
  document.addEventListener('scroll', _this.trackScrolling);
110
110
  }
111
+
112
+ // Logging GA Pageview on path change
113
+ var _this$props = _this.props,
114
+ pageview = _this$props.pageview,
115
+ currentPath = _this$props.router.asPath;
116
+ var prevPath = prevProps.router.asPath;
117
+
118
+ if (pageview && currentPath !== prevPath) {
119
+ pageview(currentPath);
120
+ }
111
121
  }, _this.trackScrolling = function () {
112
122
  var itemsPerPage = _this.props.params.itemsPerPage ? _this.props.params.itemsPerPage : 10;
113
123
  if (window.pageYOffset === 0) {
@@ -166,10 +176,10 @@ var GridContent = function (_React$Component) {
166
176
  return _this.defaultImage;
167
177
  }
168
178
  }, _this.changePageNumber = function (pageNumber, itemsPerPage, itemIndex) {
169
- var _this$props = _this.props,
170
- seoPaginate = _this$props.seoPaginate,
171
- pageview = _this$props.pageview,
172
- router = _this$props.router;
179
+ var _this$props2 = _this.props,
180
+ seoPaginate = _this$props2.seoPaginate,
181
+ pageview = _this$props2.pageview,
182
+ router = _this$props2.router;
173
183
  var currentPage = _this.state.currentPage;
174
184
 
175
185
  if (seoPaginate) {
@@ -218,9 +228,9 @@ var GridContent = function (_React$Component) {
218
228
  }
219
229
 
220
230
  var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
221
- if (pageview) {
222
- pageview(newPath);
223
- }
231
+ // if (pageview) {
232
+ // pageview(newPath)
233
+ // }
224
234
 
225
235
  router.push(pathname, newPath, {
226
236
  shallow: true
@@ -33,7 +33,7 @@ require('./ADInfeed-ae1f348d.js');
33
33
  require('./lodash-fc2922d0.js');
34
34
  require('./ADlgInfeed-f4c4a1bf.js');
35
35
  require('./get-7a75c563.js');
36
- var GridContent = require('./GridContent-db383f73.js');
36
+ var GridContent = require('./GridContent-25762807.js');
37
37
  require('./AuthorComponent-b44bb44e.js');
38
38
 
39
39
 
@@ -130,9 +130,9 @@ var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pagevi
130
130
  }
131
131
  var newPath = pageNumber === 1 ? '' + path : '' + path + (queryString.length > 0 ? '&' : '?') + 'page=' + pageNumber;
132
132
 
133
- if (pageview) {
134
- pageview(newPath);
135
- }
133
+ // if (pageview) {
134
+ // pageview(newPath)
135
+ // }
136
136
 
137
137
  router.push(pathname, newPath, {
138
138
  shallow: true
@@ -576,6 +576,18 @@ var usePrevious = function usePrevious(value) {
576
576
 
577
577
  var QueueDeckExpanded = function QueueDeckExpanded(props) {
578
578
  var router = Router.useRouter();
579
+
580
+ // Logging GA Pageview on path change
581
+ var prevPath = usePrevious(lodash.lodash.get(router, 'asPath', undefined));
582
+ React.useEffect(function () {
583
+ var pageview = props.pageview;
584
+
585
+ var currentPath = router.asPath;
586
+ if (prevPath && prevPath !== currentPath && pageview) {
587
+ pageview(router.asPath);
588
+ }
589
+ }, [router]);
590
+
579
591
  var initialData = props.dataRecord,
580
592
  client = props.client,
581
593
  params = props.params,
package/dist/cjs/index.js CHANGED
@@ -36,7 +36,7 @@ var DeckContent = require('./DeckContent.js');
36
36
  require('./lodash-fc2922d0.js');
37
37
  require('./ADlgInfeed-f4c4a1bf.js');
38
38
  var get$1 = require('./get-7a75c563.js');
39
- var GridContent = require('./GridContent-db383f73.js');
39
+ var GridContent = require('./GridContent-25762807.js');
40
40
  var AuthorComponent = require('./AuthorComponent-b44bb44e.js');
41
41
  var DeckQueue = require('./DeckQueue.js');
42
42
  require('react-bootstrap/Media');
@@ -2552,6 +2552,11 @@ var CMEDeck = function CMEDeck(_ref) {
2552
2552
  autoScroll ? React__default['default'].createElement(
2553
2553
  React__default['default'].Fragment,
2554
2554
  null,
2555
+ React__default['default'].createElement(
2556
+ 'style',
2557
+ { jsx: true },
2558
+ '\n .infinite-scroll-component {\n overflow: hidden !important;\n }\n '
2559
+ ),
2555
2560
  React__default['default'].createElement(
2556
2561
  index_es.InfiniteScroll,
2557
2562
  {
@@ -98,6 +98,16 @@ var GridContent = function (_React$Component) {
98
98
  if (prevState.currentPage !== _this.state.currentPage) {
99
99
  document.addEventListener('scroll', _this.trackScrolling);
100
100
  }
101
+
102
+ // Logging GA Pageview on path change
103
+ var _this$props = _this.props,
104
+ pageview = _this$props.pageview,
105
+ currentPath = _this$props.router.asPath;
106
+ var prevPath = prevProps.router.asPath;
107
+
108
+ if (pageview && currentPath !== prevPath) {
109
+ pageview(currentPath);
110
+ }
101
111
  }, _this.trackScrolling = function () {
102
112
  var itemsPerPage = _this.props.params.itemsPerPage ? _this.props.params.itemsPerPage : 10;
103
113
  if (window.pageYOffset === 0) {
@@ -156,10 +166,10 @@ var GridContent = function (_React$Component) {
156
166
  return _this.defaultImage;
157
167
  }
158
168
  }, _this.changePageNumber = function (pageNumber, itemsPerPage, itemIndex) {
159
- var _this$props = _this.props,
160
- seoPaginate = _this$props.seoPaginate,
161
- pageview = _this$props.pageview,
162
- router = _this$props.router;
169
+ var _this$props2 = _this.props,
170
+ seoPaginate = _this$props2.seoPaginate,
171
+ pageview = _this$props2.pageview,
172
+ router = _this$props2.router;
163
173
  var currentPage = _this.state.currentPage;
164
174
 
165
175
  if (seoPaginate) {
@@ -208,9 +218,9 @@ var GridContent = function (_React$Component) {
208
218
  }
209
219
 
210
220
  var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
211
- if (pageview) {
212
- pageview(newPath);
213
- }
221
+ // if (pageview) {
222
+ // pageview(newPath)
223
+ // }
214
224
 
215
225
  router.push(pathname, newPath, {
216
226
  shallow: true
@@ -31,5 +31,5 @@ import './ADInfeed-dff74bbe.js';
31
31
  import './lodash-17fdfebb.js';
32
32
  import './ADlgInfeed-7b29db85.js';
33
33
  import './get-bc6cf9fb.js';
34
- export { G as default } from './GridContent-6b38c580.js';
34
+ export { G as default } from './GridContent-93e5f16a.js';
35
35
  import './AuthorComponent-4f5f15ed.js';
@@ -6,7 +6,7 @@ import './_iter-detect-7c281f0a.js';
6
6
  import { _ as _toConsumableArray } from './toConsumableArray-c5e2fde8.js';
7
7
  import './_object-pie-33c40e79.js';
8
8
  import { _ as _extends } from './extends-92072fff.js';
9
- import React, { useState, useEffect, useRef } from 'react';
9
+ import React, { useEffect, useState, useRef } from 'react';
10
10
  import { l as lib_3 } from './debounce-42a7f724.js';
11
11
  import 'prop-types';
12
12
  import 'react-bootstrap/Card';
@@ -124,9 +124,9 @@ var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pagevi
124
124
  }
125
125
  var newPath = pageNumber === 1 ? '' + path : '' + path + (queryString.length > 0 ? '&' : '?') + 'page=' + pageNumber;
126
126
 
127
- if (pageview) {
128
- pageview(newPath);
129
- }
127
+ // if (pageview) {
128
+ // pageview(newPath)
129
+ // }
130
130
 
131
131
  router.push(pathname, newPath, {
132
132
  shallow: true
@@ -570,6 +570,18 @@ var usePrevious = function usePrevious(value) {
570
570
 
571
571
  var QueueDeckExpanded = function QueueDeckExpanded(props) {
572
572
  var router = useRouter();
573
+
574
+ // Logging GA Pageview on path change
575
+ var prevPath = usePrevious(lodash.get(router, 'asPath', undefined));
576
+ useEffect(function () {
577
+ var pageview = props.pageview;
578
+
579
+ var currentPath = router.asPath;
580
+ if (prevPath && prevPath !== currentPath && pageview) {
581
+ pageview(router.asPath);
582
+ }
583
+ }, [router]);
584
+
573
585
  var initialData = props.dataRecord,
574
586
  client = props.client,
575
587
  params = props.params,
package/dist/esm/index.js CHANGED
@@ -33,7 +33,7 @@ export { default as DeckContent } from './DeckContent.js';
33
33
  import './lodash-17fdfebb.js';
34
34
  import './ADlgInfeed-7b29db85.js';
35
35
  import { i as isFunction_1, a as isArray_1, _ as _arrayMap } from './get-bc6cf9fb.js';
36
- export { A as AD, G as GridContent } from './GridContent-6b38c580.js';
36
+ export { A as AD, G as GridContent } from './GridContent-93e5f16a.js';
37
37
  import { A as AuthorComponent } from './AuthorComponent-4f5f15ed.js';
38
38
  export { default as DeckQueue } from './DeckQueue.js';
39
39
  import 'react-bootstrap/Media';
@@ -2528,6 +2528,11 @@ var CMEDeck = function CMEDeck(_ref) {
2528
2528
  autoScroll ? React.createElement(
2529
2529
  React.Fragment,
2530
2530
  null,
2531
+ React.createElement(
2532
+ 'style',
2533
+ { jsx: true },
2534
+ '\n .infinite-scroll-component {\n overflow: hidden !important;\n }\n '
2535
+ ),
2531
2536
  React.createElement(
2532
2537
  InfiniteScroll,
2533
2538
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.442",
3
+ "version": "1.0.443",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",