@mjhls/mjh-framework 1.0.444 → 1.0.445

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.444
2
+ # mjh-framework v. 1.0.445
3
3
 
4
4
  > Foundation Framework
5
5
 
@@ -78,8 +78,7 @@ var GridContent = function (_React$Component) {
78
78
  scrolling: true,
79
79
  query: _this.query,
80
80
  currentPage: _this.props.currentPage || 1,
81
- lgInfeedAd: _this.props.lgInfeedAd ? _this.props.lgInfeedAd : false,
82
- desktopView: false
81
+ lgInfeedAd: _this.props.lgInfeedAd ? _this.props.lgInfeedAd : false
83
82
  }, _this.loadMore = debounce.debounce_1(function () {
84
83
  _this.setState(function (state) {
85
84
  var page = state.page,
@@ -94,14 +93,6 @@ var GridContent = function (_React$Component) {
94
93
  };
95
94
  }, _this.loadData);
96
95
  }, 0), _this.componentDidMount = function () {
97
- // Setting desktopView flag to show large infeed ad by checking lgInfeedAd flag in desktop view( window >= 1200px ).
98
- if (_this.state.lgInfeedAd && window && window.innerWidth >= 1200) {
99
- _this.setState(function (state) {
100
- return _extends._extends({}, state, {
101
- desktopView: true
102
- });
103
- });
104
- }
105
96
  document.addEventListener('scroll', _this.trackScrolling);
106
97
  }, _this.componentWillUnmount = function () {
107
98
  document.removeEventListener('scroll', _this.trackScrolling);
@@ -272,7 +263,7 @@ var GridContent = function (_React$Component) {
272
263
 
273
264
  inherits._createClass(GridContent, [{
274
265
  key: 'cardLoader',
275
- value: function cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, desktopView) {
266
+ value: function cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, lgInfeedAd) {
276
267
  var _this2 = this;
277
268
 
278
269
  var lgVar = Math.floor(12 / columns);
@@ -362,12 +353,13 @@ var GridContent = function (_React$Component) {
362
353
  return [].concat(toConsumableArray._toConsumableArray(arr.slice(0, index)), [newElement], toConsumableArray._toConsumableArray(arr.slice(index)));
363
354
  };
364
355
  var posts = [];
365
- if (brandInsight && (desktopView || showBI)) {
356
+ if (brandInsight && (lgInfeedAd || showBI)) {
366
357
  var firstThree = this.state.data.slice(0, 3);
367
358
  var data = this.state.data.slice(3);
368
359
 
369
360
  // Need to pass flag "lgInfeedAd={true}" along with brandInsight from site level for large infeed-ad to render
370
- if (desktopView) {
361
+ // Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
362
+ if (lgInfeedAd && window && window.innerWidth >= 1200) {
371
363
  var lgInFeedAd = {
372
364
  _type: 'lg-infeed',
373
365
  adUnit: brandInsight.adUnit,
@@ -393,7 +385,8 @@ var GridContent = function (_React$Component) {
393
385
  }
394
386
 
395
387
  if (showBI) {
396
- if (desktopView) {
388
+ // Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
389
+ if (lgInfeedAd && window && window.innerWidth >= 1200) {
397
390
  brandInsight.interval = 8;
398
391
  } else {
399
392
  brandInsight.interval = 5;
@@ -685,7 +678,7 @@ var GridContent = function (_React$Component) {
685
678
  React__default['default'].createElement(
686
679
  Container__default['default'],
687
680
  null,
688
- this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.desktopView)
681
+ this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.lgInfeedAd)
689
682
  )
690
683
  ) : React__default['default'].createElement(
691
684
  React__default['default'].Fragment,
@@ -693,7 +686,7 @@ var GridContent = function (_React$Component) {
693
686
  React__default['default'].createElement(
694
687
  Container__default['default'],
695
688
  null,
696
- this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.desktopView)
689
+ this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.lgInfeedAd)
697
690
  ),
698
691
  React__default['default'].createElement(
699
692
  'div',
@@ -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-0df16724.js');
36
+ var GridContent = require('./GridContent-6a0216fb.js');
37
37
  require('./AuthorComponent-b44bb44e.js');
38
38
 
39
39
 
@@ -145,16 +145,16 @@ var checkExternalUrl = function checkExternalUrl(url) {
145
145
  return new RegExp(['http', 'https'].join('|')).test(url);
146
146
  };
147
147
 
148
- var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, desktopView) {
148
+ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd) {
149
149
  var numberOfItemsBeforeAd = 6;
150
-
151
150
  var insertBrandInsightAd = function insertBrandInsightAd(arr, index, newElement) {
152
151
  return [].concat(toConsumableArray._toConsumableArray(arr.slice(0, index)), [newElement], toConsumableArray._toConsumableArray(arr.slice(index)));
153
152
  };
154
153
 
155
154
  // Need to pass flag "lgInfeedAd={true}" along with brandInsightAd from site level for large infeed-ad to render
156
- if (desktopView && brandInsightAd) {
157
- var lgInfeedAd = {
155
+ // Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
156
+ if (lgInfeedAd && brandInsightAd && window && window.innerWidth >= 1200) {
157
+ var lgInfeed = {
158
158
  _type: 'lg-infeed',
159
159
  adUnit: brandInsightAd.adUnit,
160
160
  className: 'lg-infeed',
@@ -170,7 +170,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
170
170
  var set = lodash.lodash.chunk(chunk, 2);
171
171
  for (var i = 0; i < set.length; i++) {
172
172
  if (i !== set.length - 1) {
173
- set[i].push(lgInfeedAd);
173
+ set[i].push(lgInfeed);
174
174
  }
175
175
  }
176
176
  return lodash.lodash.flattenDeep(set);
@@ -179,7 +179,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
179
179
  }
180
180
 
181
181
  if (showBI && brandInsightAd) {
182
- if (desktopView) brandInsightAd.interval = 8;
182
+ // Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
183
+ if (lgInfeedAd && window && window.innerWidth >= 1200) brandInsightAd.interval = 8;
183
184
  var pos = 0;
184
185
  for (var i = 1; pos < data.length; i++) {
185
186
  var inFeedAd = {
@@ -648,11 +649,6 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
648
649
  values = _useState10[0],
649
650
  setValues = _useState10[1];
650
651
 
651
- var _useState11 = React.useState(false),
652
- _useState12 = slicedToArray._slicedToArray(_useState11, 2),
653
- desktopView = _useState12[0],
654
- setDesktopView = _useState12[1];
655
-
656
652
  var itemsPerPage = params && params.itemsPerPage ? params.itemsPerPage : 10;
657
653
 
658
654
  var prevValues = usePrevious(values);
@@ -674,10 +670,6 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
674
670
  }, [initialData]);
675
671
 
676
672
  React.useEffect(function () {
677
- // Setting DesktopView flag to show large infeed ad by checking lgInfeedAd flag in desktop view( window >= 1200px ).
678
- if (lgInfeedAd && window && window.innerWidth >= 1200) {
679
- setDesktopView(true);
680
- }
681
673
  if (prevValues) {
682
674
  if (values.page !== prevValues.page && values.from !== prevValues.from && values.to !== prevValues.from) {
683
675
  loadData(values, query, client, params, setData, setScrolling, pointer, pointerArray);
@@ -714,7 +706,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
714
706
  React__default['default'].createElement(
715
707
  reactBootstrap.Container,
716
708
  null,
717
- cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, desktopView)
709
+ cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd)
718
710
  )
719
711
  ),
720
712
  React__default['default'].createElement(
@@ -728,7 +720,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
728
720
  React__default['default'].createElement(
729
721
  reactBootstrap.Container,
730
722
  null,
731
- cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, desktopView)
723
+ cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd)
732
724
  ),
733
725
  React__default['default'].createElement(
734
726
  'div',
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-0df16724.js');
39
+ var GridContent = require('./GridContent-6a0216fb.js');
40
40
  var AuthorComponent = require('./AuthorComponent-b44bb44e.js');
41
41
  var DeckQueue = require('./DeckQueue.js');
42
42
  require('react-bootstrap/Media');
@@ -15028,6 +15028,11 @@ var PublicationLanding = function PublicationLanding(props) {
15028
15028
  return React__default['default'].createElement(
15029
15029
  'div',
15030
15030
  { id: 'publicationLanding' },
15031
+ React__default['default'].createElement(
15032
+ 'style',
15033
+ { jsx: true },
15034
+ '\n #pubYearFilter .dropdown-menu.show {\n max-height: 25vh;\n }\n '
15035
+ ),
15031
15036
  React__default['default'].createElement(
15032
15037
  Row__default['default'],
15033
15038
  { style: { marginBottom: '1rem' } },
@@ -68,8 +68,7 @@ var GridContent = function (_React$Component) {
68
68
  scrolling: true,
69
69
  query: _this.query,
70
70
  currentPage: _this.props.currentPage || 1,
71
- lgInfeedAd: _this.props.lgInfeedAd ? _this.props.lgInfeedAd : false,
72
- desktopView: false
71
+ lgInfeedAd: _this.props.lgInfeedAd ? _this.props.lgInfeedAd : false
73
72
  }, _this.loadMore = debounce_1(function () {
74
73
  _this.setState(function (state) {
75
74
  var page = state.page,
@@ -84,14 +83,6 @@ var GridContent = function (_React$Component) {
84
83
  };
85
84
  }, _this.loadData);
86
85
  }, 0), _this.componentDidMount = function () {
87
- // Setting desktopView flag to show large infeed ad by checking lgInfeedAd flag in desktop view( window >= 1200px ).
88
- if (_this.state.lgInfeedAd && window && window.innerWidth >= 1200) {
89
- _this.setState(function (state) {
90
- return _extends({}, state, {
91
- desktopView: true
92
- });
93
- });
94
- }
95
86
  document.addEventListener('scroll', _this.trackScrolling);
96
87
  }, _this.componentWillUnmount = function () {
97
88
  document.removeEventListener('scroll', _this.trackScrolling);
@@ -262,7 +253,7 @@ var GridContent = function (_React$Component) {
262
253
 
263
254
  _createClass(GridContent, [{
264
255
  key: 'cardLoader',
265
- value: function cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, desktopView) {
256
+ value: function cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, lgInfeedAd) {
266
257
  var _this2 = this;
267
258
 
268
259
  var lgVar = Math.floor(12 / columns);
@@ -352,12 +343,13 @@ var GridContent = function (_React$Component) {
352
343
  return [].concat(_toConsumableArray(arr.slice(0, index)), [newElement], _toConsumableArray(arr.slice(index)));
353
344
  };
354
345
  var posts = [];
355
- if (brandInsight && (desktopView || showBI)) {
346
+ if (brandInsight && (lgInfeedAd || showBI)) {
356
347
  var firstThree = this.state.data.slice(0, 3);
357
348
  var data = this.state.data.slice(3);
358
349
 
359
350
  // Need to pass flag "lgInfeedAd={true}" along with brandInsight from site level for large infeed-ad to render
360
- if (desktopView) {
351
+ // Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
352
+ if (lgInfeedAd && window && window.innerWidth >= 1200) {
361
353
  var lgInFeedAd = {
362
354
  _type: 'lg-infeed',
363
355
  adUnit: brandInsight.adUnit,
@@ -383,7 +375,8 @@ var GridContent = function (_React$Component) {
383
375
  }
384
376
 
385
377
  if (showBI) {
386
- if (desktopView) {
378
+ // Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
379
+ if (lgInfeedAd && window && window.innerWidth >= 1200) {
387
380
  brandInsight.interval = 8;
388
381
  } else {
389
382
  brandInsight.interval = 5;
@@ -675,7 +668,7 @@ var GridContent = function (_React$Component) {
675
668
  React.createElement(
676
669
  Container,
677
670
  null,
678
- this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.desktopView)
671
+ this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.lgInfeedAd)
679
672
  )
680
673
  ) : React.createElement(
681
674
  React.Fragment,
@@ -683,7 +676,7 @@ var GridContent = function (_React$Component) {
683
676
  React.createElement(
684
677
  Container,
685
678
  null,
686
- this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.desktopView)
679
+ this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.lgInfeedAd)
687
680
  ),
688
681
  React.createElement(
689
682
  'div',
@@ -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-2173a84c.js';
34
+ export { G as default } from './GridContent-7e11f013.js';
35
35
  import './AuthorComponent-4f5f15ed.js';
@@ -139,16 +139,16 @@ var checkExternalUrl = function checkExternalUrl(url) {
139
139
  return new RegExp(['http', 'https'].join('|')).test(url);
140
140
  };
141
141
 
142
- var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, desktopView) {
142
+ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd) {
143
143
  var numberOfItemsBeforeAd = 6;
144
-
145
144
  var insertBrandInsightAd = function insertBrandInsightAd(arr, index, newElement) {
146
145
  return [].concat(_toConsumableArray(arr.slice(0, index)), [newElement], _toConsumableArray(arr.slice(index)));
147
146
  };
148
147
 
149
148
  // Need to pass flag "lgInfeedAd={true}" along with brandInsightAd from site level for large infeed-ad to render
150
- if (desktopView && brandInsightAd) {
151
- var lgInfeedAd = {
149
+ // Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
150
+ if (lgInfeedAd && brandInsightAd && window && window.innerWidth >= 1200) {
151
+ var lgInfeed = {
152
152
  _type: 'lg-infeed',
153
153
  adUnit: brandInsightAd.adUnit,
154
154
  className: 'lg-infeed',
@@ -164,7 +164,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
164
164
  var set = lodash.chunk(chunk, 2);
165
165
  for (var i = 0; i < set.length; i++) {
166
166
  if (i !== set.length - 1) {
167
- set[i].push(lgInfeedAd);
167
+ set[i].push(lgInfeed);
168
168
  }
169
169
  }
170
170
  return lodash.flattenDeep(set);
@@ -173,7 +173,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
173
173
  }
174
174
 
175
175
  if (showBI && brandInsightAd) {
176
- if (desktopView) brandInsightAd.interval = 8;
176
+ // Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
177
+ if (lgInfeedAd && window && window.innerWidth >= 1200) brandInsightAd.interval = 8;
177
178
  var pos = 0;
178
179
  for (var i = 1; pos < data.length; i++) {
179
180
  var inFeedAd = {
@@ -642,11 +643,6 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
642
643
  values = _useState10[0],
643
644
  setValues = _useState10[1];
644
645
 
645
- var _useState11 = useState(false),
646
- _useState12 = _slicedToArray(_useState11, 2),
647
- desktopView = _useState12[0],
648
- setDesktopView = _useState12[1];
649
-
650
646
  var itemsPerPage = params && params.itemsPerPage ? params.itemsPerPage : 10;
651
647
 
652
648
  var prevValues = usePrevious(values);
@@ -668,10 +664,6 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
668
664
  }, [initialData]);
669
665
 
670
666
  useEffect(function () {
671
- // Setting DesktopView flag to show large infeed ad by checking lgInfeedAd flag in desktop view( window >= 1200px ).
672
- if (lgInfeedAd && window && window.innerWidth >= 1200) {
673
- setDesktopView(true);
674
- }
675
667
  if (prevValues) {
676
668
  if (values.page !== prevValues.page && values.from !== prevValues.from && values.to !== prevValues.from) {
677
669
  loadData(values, query, client, params, setData, setScrolling, pointer, pointerArray);
@@ -708,7 +700,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
708
700
  React.createElement(
709
701
  Container,
710
702
  null,
711
- cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, desktopView)
703
+ cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd)
712
704
  )
713
705
  ),
714
706
  React.createElement(
@@ -722,7 +714,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
722
714
  React.createElement(
723
715
  Container,
724
716
  null,
725
- cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, desktopView)
717
+ cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd)
726
718
  ),
727
719
  React.createElement(
728
720
  'div',
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-2173a84c.js';
36
+ export { A as AD, G as GridContent } from './GridContent-7e11f013.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';
@@ -15004,6 +15004,11 @@ var PublicationLanding = function PublicationLanding(props) {
15004
15004
  return React.createElement(
15005
15005
  'div',
15006
15006
  { id: 'publicationLanding' },
15007
+ React.createElement(
15008
+ 'style',
15009
+ { jsx: true },
15010
+ '\n #pubYearFilter .dropdown-menu.show {\n max-height: 25vh;\n }\n '
15011
+ ),
15007
15012
  React.createElement(
15008
15013
  Row,
15009
15014
  { style: { marginBottom: '1rem' } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.444",
3
+ "version": "1.0.445",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",