@mjhls/mjh-framework 1.0.658-masterdeck-loadmore → 1.0.659

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 (144) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +3 -3
  4. package/dist/cjs/AD300x250x600.js +3 -3
  5. package/dist/cjs/AD728x90.js +4 -4
  6. package/dist/cjs/ADFloatingFooter.js +2 -2
  7. package/dist/cjs/ADGutter.js +2 -2
  8. package/dist/cjs/ADSkyscraper.js +2 -2
  9. package/dist/cjs/ADSponsoredResources.js +2 -2
  10. package/dist/cjs/ADWebcast.js +2 -2
  11. package/dist/cjs/ADWelcome.js +2 -2
  12. package/dist/cjs/AdSlot.js +2 -2
  13. package/dist/cjs/AdSlotsProvider.js +1 -1
  14. package/dist/cjs/ArticleSeriesListing.js +4 -4
  15. package/dist/cjs/Auth.js +507 -256
  16. package/dist/cjs/{BlockContent-091a991f.js → BlockContent-88f69acd.js} +1 -1
  17. package/dist/cjs/CMEDeck.js +5 -5
  18. package/dist/cjs/Column3.js +4 -4
  19. package/dist/cjs/ConferenceArticleCard.js +2 -2
  20. package/dist/cjs/DeckContent.js +7 -7
  21. package/dist/cjs/DeckQueue.js +6 -6
  22. package/dist/cjs/{Dfp-f6a18ed2.js → Dfp-b2bc3b97.js} +1 -1
  23. package/dist/cjs/EventsDeck.js +5 -5
  24. package/dist/cjs/ExternalResources.js +7 -7
  25. package/dist/cjs/Feature.js +3 -3
  26. package/dist/cjs/ForbesHero.js +2 -2
  27. package/dist/cjs/GridContent.js +10 -10
  28. package/dist/cjs/GridHero.js +2 -2
  29. package/dist/cjs/GroupDeck.js +1 -1
  30. package/dist/cjs/HamMagazine.js +19 -11
  31. package/dist/cjs/Hero.js +1 -1
  32. package/dist/cjs/HorizontalHero.js +2 -2
  33. package/dist/cjs/IssueContentDeck.js +2 -2
  34. package/dist/cjs/IssueDeck.js +2 -2
  35. package/dist/cjs/IssueLanding.js +7 -7
  36. package/dist/cjs/LeftNav.js +2 -2
  37. package/dist/cjs/MasterDeck.js +41 -73
  38. package/dist/cjs/NavMagazine.js +4 -4
  39. package/dist/cjs/NavNative.js +2 -2
  40. package/dist/cjs/OncliveHero.js +2 -2
  41. package/dist/cjs/OncliveLargeHero.js +2 -2
  42. package/dist/cjs/PartnerDetailListing.js +15 -1212
  43. package/dist/cjs/PublicationDeck.js +1 -1
  44. package/dist/cjs/QueueDeckExpanded.js +9 -9
  45. package/dist/cjs/RecentNews.js +2 -2
  46. package/dist/cjs/RelatedContent.js +2 -2
  47. package/dist/cjs/{SocialSearchComponent-81a50f81.js → SocialSearchComponent-962b1344.js} +5 -5
  48. package/dist/cjs/TaxonomyCard.js +2 -2
  49. package/dist/cjs/TemplateNormal.js +3 -3
  50. package/dist/cjs/ThumbnailCard.js +1 -1
  51. package/dist/cjs/Ustream.js +2 -2
  52. package/dist/cjs/VerticalHero.js +2 -2
  53. package/dist/cjs/VideoSeriesCard.js +2 -2
  54. package/dist/cjs/VideoSeriesListing.js +3 -3
  55. package/dist/cjs/View.js +42 -42
  56. package/dist/cjs/YahooHero.js +2 -2
  57. package/dist/cjs/YoutubeGroup.js +1 -1
  58. package/dist/cjs/getRelatedArticle.js +5 -354
  59. package/dist/cjs/getSerializers.js +6 -6
  60. package/dist/cjs/{getTargeting-9af0ef69.js → getTargeting-fee8c429.js} +2 -2
  61. package/dist/cjs/getTargeting.js +1 -1
  62. package/dist/cjs/{index-fa8ed292.js → index-2d0a4911.js} +34 -27
  63. package/dist/cjs/{index-c66ea549.js → index-47e709f6.js} +462 -450
  64. package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
  65. package/dist/cjs/{index-be0c82be.js → index-b5eb3ff8.js} +20 -19
  66. package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
  67. package/dist/cjs/index.js +16 -15
  68. package/dist/cjs/{main-a4cb15bb.js → main-b6c96c8d.js} +67 -36
  69. package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
  70. package/dist/cjs/urlFor.js +1 -1
  71. package/dist/esm/AD.js +1 -1
  72. package/dist/esm/AD300x250.js +3 -3
  73. package/dist/esm/AD300x250x600.js +3 -3
  74. package/dist/esm/AD728x90.js +4 -4
  75. package/dist/esm/ADFloatingFooter.js +2 -2
  76. package/dist/esm/ADGutter.js +2 -2
  77. package/dist/esm/ADSkyscraper.js +2 -2
  78. package/dist/esm/ADSponsoredResources.js +2 -2
  79. package/dist/esm/ADWebcast.js +2 -2
  80. package/dist/esm/ADWelcome.js +2 -2
  81. package/dist/esm/AdSlot.js +2 -2
  82. package/dist/esm/AdSlotsProvider.js +1 -1
  83. package/dist/esm/ArticleSeriesListing.js +4 -4
  84. package/dist/esm/Auth.js +499 -248
  85. package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-a614acdf.js} +1 -1
  86. package/dist/esm/CMEDeck.js +5 -5
  87. package/dist/esm/Column3.js +4 -4
  88. package/dist/esm/ConferenceArticleCard.js +2 -2
  89. package/dist/esm/DeckContent.js +7 -7
  90. package/dist/esm/DeckQueue.js +6 -6
  91. package/dist/esm/{Dfp-96b49def.js → Dfp-8a8fca18.js} +1 -1
  92. package/dist/esm/EventsDeck.js +5 -5
  93. package/dist/esm/ExternalResources.js +7 -7
  94. package/dist/esm/Feature.js +3 -3
  95. package/dist/esm/ForbesHero.js +2 -2
  96. package/dist/esm/GridContent.js +10 -10
  97. package/dist/esm/GridHero.js +2 -2
  98. package/dist/esm/GroupDeck.js +1 -1
  99. package/dist/esm/HamMagazine.js +19 -11
  100. package/dist/esm/Hero.js +1 -1
  101. package/dist/esm/HorizontalHero.js +2 -2
  102. package/dist/esm/IssueContentDeck.js +2 -2
  103. package/dist/esm/IssueDeck.js +2 -2
  104. package/dist/esm/IssueLanding.js +7 -7
  105. package/dist/esm/LeftNav.js +2 -2
  106. package/dist/esm/MasterDeck.js +41 -73
  107. package/dist/esm/NavMagazine.js +4 -4
  108. package/dist/esm/NavNative.js +2 -2
  109. package/dist/esm/OncliveHero.js +2 -2
  110. package/dist/esm/OncliveLargeHero.js +2 -2
  111. package/dist/esm/PartnerDetailListing.js +13 -1209
  112. package/dist/esm/PublicationDeck.js +1 -1
  113. package/dist/esm/QueueDeckExpanded.js +9 -9
  114. package/dist/esm/RecentNews.js +2 -2
  115. package/dist/esm/RelatedContent.js +2 -2
  116. package/dist/esm/{SocialSearchComponent-55960ec4.js → SocialSearchComponent-75527dfe.js} +5 -5
  117. package/dist/esm/TaxonomyCard.js +2 -2
  118. package/dist/esm/TemplateNormal.js +3 -3
  119. package/dist/esm/ThumbnailCard.js +1 -1
  120. package/dist/esm/Ustream.js +2 -2
  121. package/dist/esm/VerticalHero.js +2 -2
  122. package/dist/esm/VideoSeriesCard.js +2 -2
  123. package/dist/esm/VideoSeriesListing.js +3 -3
  124. package/dist/esm/View.js +15 -15
  125. package/dist/esm/YahooHero.js +2 -2
  126. package/dist/esm/YoutubeGroup.js +1 -1
  127. package/dist/esm/getRelatedArticle.js +5 -354
  128. package/dist/esm/getSerializers.js +6 -6
  129. package/dist/esm/{index-73819142.js → index-51a80699.js} +20 -19
  130. package/dist/esm/{index-0e45a0b2.js → index-93ec3c59.js} +34 -27
  131. package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
  132. package/dist/esm/{index-af4d4efb.js → index-ed279e5e.js} +462 -450
  133. package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
  134. package/dist/esm/index.js +14 -13
  135. package/dist/esm/{main-5d1e4bd3.js → main-0465b2a0.js} +65 -34
  136. package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
  137. package/dist/esm/urlFor.js +1 -1
  138. package/package.json +1 -1
  139. package/dist/cjs/index-bd6c9f56.js +0 -211
  140. package/dist/esm/index-db3bb315.js +0 -207
  141. /package/dist/cjs/{ADInfeed-15a7d07f.js → ADInfeed-eaa6c661.js} +0 -0
  142. /package/dist/cjs/{ADlgInfeed-da05bb23.js → ADlgInfeed-f25eb4f7.js} +0 -0
  143. /package/dist/esm/{ADInfeed-e10d10a6.js → ADInfeed-c27997a3.js} +0 -0
  144. /package/dist/esm/{ADlgInfeed-c5dc4827.js → ADlgInfeed-41c3909c.js} +0 -0
@@ -14,30 +14,30 @@ import './web.dom.iterable-8956f9a5.js';
14
14
  import './typeof-08f2c380.js';
15
15
  import './_is-array-49698029.js';
16
16
  import React__default from 'react';
17
- import { l as lib_3 } from './index-0e45a0b2.js';
17
+ import { l as lib_3 } from './index-93ec3c59.js';
18
18
  import 'prop-types';
19
19
  import Container from 'react-bootstrap/Container';
20
20
  import 'react-bootstrap/Row';
21
21
  import 'react-bootstrap/Col';
22
22
  import 'react-bootstrap/Card';
23
- import './moment-e2f9b20c.js';
23
+ import './moment-12415288.js';
24
24
  import { withRouter } from 'next/router';
25
25
  import './isSymbol-807e927e.js';
26
26
  import { d as debounce_1 } from './debounce-1a993acf.js';
27
- import { I as InfiniteScroll } from './index.es-29c1cef5.js';
27
+ import { I as InfiniteScroll } from './index.es-938a3a58.js';
28
28
  import 'react-dom';
29
29
  import { V as VisibilitySensor } from './visibility-sensor-0baa4eea.js';
30
- import './index-73819142.js';
31
- import { m as main_36 } from './main-5d1e4bd3.js';
30
+ import './index-51a80699.js';
31
+ import { m as main_39 } from './main-0465b2a0.js';
32
32
  import './stringify-008c8802.js';
33
33
  import './slicedToArray-7021e5df.js';
34
34
  import { _ as _Promise } from './asyncToGenerator-7c654f36.js';
35
35
  import './_set-species-cede29f8.js';
36
36
  import './beam-681a9749.js';
37
37
  import './AdSlot.js';
38
- import { A as ADInfeed } from './ADInfeed-e10d10a6.js';
38
+ import { A as ADInfeed } from './ADInfeed-c27997a3.js';
39
39
  import { l as lodash } from './lodash-17fdfebb.js';
40
- import { A as ADlgInfeed } from './ADlgInfeed-c5dc4827.js';
40
+ import { A as ADlgInfeed } from './ADlgInfeed-41c3909c.js';
41
41
 
42
42
  var MasterDeck = function (_React$Component) {
43
43
  _inherits(MasterDeck, _React$Component);
@@ -62,23 +62,23 @@ var MasterDeck = function (_React$Component) {
62
62
  from: _this.params ? _this.params.from : 0,
63
63
  to: _this.params ? _this.params.to : 2,
64
64
  total_pages: null,
65
- scrolling: false,
65
+ scrolling: true,
66
66
  query: _this.query,
67
67
  currentPage: _this.props.currentPage || 1,
68
- dataRemapped: !_this.props.showBI || !_this.props.brandInsightAd,
68
+ dataRemapped: false,
69
69
  lastDataSize: _this.data ? _this.data.length : 0,
70
70
  itemsPerPage: _this.params ? _this.params.to - _this.params.from : 2
71
71
  }, _this.loadMore = debounce_1(function () {
72
72
  _this.setState(function (state) {
73
73
  var page = state.page,
74
74
  from = state.from,
75
- to = state.to,
76
- itemsPerPage = state.itemsPerPage;
75
+ per = state.per,
76
+ to = state.to;
77
77
 
78
78
  return {
79
79
  page: page + 1,
80
- from: from + itemsPerPage,
81
- to: to + itemsPerPage
80
+ from: from + per,
81
+ to: to + per
82
82
  };
83
83
  }, _this.loadData);
84
84
  }, 0), _this.loadData = function () {
@@ -123,51 +123,25 @@ var MasterDeck = function (_React$Component) {
123
123
  });
124
124
  });
125
125
 
126
- if (dataArr.length > 0) {
127
- _this.checkMoreDataAvailable();
128
- _this.setState({
129
- data: [].concat(_toConsumableArray(data), _toConsumableArray(dataArr)),
130
- lastDataSize: dataArr.length
131
- });
132
- } else {
133
- _this.setState({
134
- scrolling: false,
135
- lastDataSize: 0
136
- });
137
- }
138
- }, _this.checkMoreDataAvailable = function () {
139
- var _this$state2 = _this.state,
140
- from = _this$state2.from,
141
- to = _this$state2.to,
142
- itemsPerPage = _this$state2.itemsPerPage,
143
- query = _this$state2.query;
144
- var _this$props2 = _this.props,
145
- client = _this$props2.client,
146
- dataHandler = _this$props2.dataHandler;
147
-
148
- var params = _extends({}, _this.props.params, { from: from + itemsPerPage, to: to + itemsPerPage });
149
- if (dataHandler) {
150
- var dataHandlerPromise = new _Promise(function (resolve, reject) {
151
- try {
152
- var result = dataHandler(params);
153
- resolve(result);
154
- } catch (e) {
155
- reject(e);
156
- }
157
- });
158
- dataHandlerPromise.then(function (dataArr) {
159
- if (dataArr && dataArr.length > 0) _this.setState({ scrolling: true });else _this.setState({ scrolling: false });
160
- });
161
- } else {
162
- client.fetch(query, params).then(function (dataArr) {
163
- if (dataArr && dataArr.length > 0) _this.setState({ scrolling: true });else _this.setState({ scrolling: false });
164
- });
165
- }
126
+ _this.setState(function () {
127
+ if (dataArr.length > 0) {
128
+ return {
129
+ data: [].concat(_toConsumableArray(data), _toConsumableArray(dataArr)),
130
+ lastDataSize: dataArr.length,
131
+ scrolling: true
132
+ };
133
+ } else {
134
+ return {
135
+ scrolling: false,
136
+ lastDataSize: 0
137
+ };
138
+ }
139
+ });
166
140
  }, _this.changePageNumber = function (pageNumber) {
167
- var _this$props3 = _this.props,
168
- seoPaginate = _this$props3.seoPaginate,
169
- pageview = _this$props3.pageview,
170
- router = _this$props3.router;
141
+ var _this$props2 = _this.props,
142
+ seoPaginate = _this$props2.seoPaginate,
143
+ pageview = _this$props2.pageview,
144
+ router = _this$props2.router;
171
145
  var currentPage = _this.state.currentPage;
172
146
 
173
147
  if (seoPaginate) {
@@ -245,6 +219,9 @@ var MasterDeck = function (_React$Component) {
245
219
  var insertBrandInsightAd = function insertBrandInsightAd(arr, index, newElement) {
246
220
  return [].concat(_toConsumableArray(arr.slice(0, index)), [newElement], _toConsumableArray(arr.slice(index)));
247
221
  };
222
+ _this.componentDidMount = function () {
223
+ _this.setState({ dataRemapped: !showBI || !brandInsightAd ? true : false });
224
+ };
248
225
  // Need to pass flag "lgInfeedAd={true}" along with brandInsightAd from site level for large infeed-ad to render
249
226
  // Checking lgInfeedAd flag in desktop view ( window >= 1400px ).
250
227
  // Integrating large infeed AD
@@ -339,7 +316,7 @@ var MasterDeck = function (_React$Component) {
339
316
  React__default.Fragment,
340
317
  { key: index },
341
318
  React__default.createElement(_this2.Deck, { data: row, variant: variant, index: index, client: _this.props.client, defaultImage: _this.defaultImage }),
342
- main_36 && _this.rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && React__default.createElement(
319
+ main_39 && _this.rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && React__default.createElement(
343
320
  'div',
344
321
  { className: 'ad-container', style: { margin: '0 auto' } },
345
322
  _this.renderMobileAd(index, numberOfItemsBeforeAd, _this.rightItems)
@@ -389,10 +366,10 @@ var MasterDeck = function (_React$Component) {
389
366
  rightItems[i].component
390
367
  );
391
368
  }, _this.renderManualPagination = function () {
392
- var _this$state3 = _this.state,
393
- currentPage = _this$state3.currentPage,
394
- itemsPerPage = _this$state3.itemsPerPage,
395
- lastDataSize = _this$state3.lastDataSize;
369
+ var _this$state2 = _this.state,
370
+ currentPage = _this$state2.currentPage,
371
+ itemsPerPage = _this$state2.itemsPerPage,
372
+ lastDataSize = _this$state2.lastDataSize;
396
373
 
397
374
  console.log('lastDataSize:', lastDataSize);
398
375
  console.log('itemsPerPage:', itemsPerPage);
@@ -443,7 +420,7 @@ var MasterDeck = function (_React$Component) {
443
420
  }, {
444
421
  key: 'componentDidMount',
445
422
  value: function componentDidMount() {
446
- this.checkMoreDataAvailable();
423
+ // this.loadData();
447
424
  }
448
425
  // Passing 'brandInsightAd','showBI' and 'lgInfeedAd'
449
426
 
@@ -499,16 +476,7 @@ var MasterDeck = function (_React$Component) {
499
476
  'button',
500
477
  {
501
478
  className: 'btn',
502
- style: {
503
- margin: '0 auto 2rem',
504
- display: 'block',
505
- fontSize: '18px',
506
- padding: '.5rem 1.5rem',
507
- boxShadow: '1px 2px 4px 4px rgba(0,0,0,.15)',
508
- background: 'var(--primary)',
509
- color: '#fff',
510
- borderRadius: '5px'
511
- },
479
+ style: { margin: '0 auto 2rem', display: 'block', fontSize: '18px', padding: '.5rem 1.5rem', boxShadow: '1px 2px 4px 4px rgba(0,0,0,.15)', background: 'var(--primary)', color: '#fff', borderRadius: '5px' },
512
480
  onClick: function onClick(e) {
513
481
  _this3.loadMore();
514
482
  } },
@@ -8,7 +8,7 @@ import './web.dom.iterable-8956f9a5.js';
8
8
  import React__default, { useRef, useState, useEffect } from 'react';
9
9
  import 'prop-types';
10
10
  import Container from 'react-bootstrap/Container';
11
- import { a as main_37 } from './main-5d1e4bd3.js';
11
+ import { a as main_40 } from './main-0465b2a0.js';
12
12
  import './stringify-008c8802.js';
13
13
  import { _ as _slicedToArray } from './slicedToArray-7021e5df.js';
14
14
  import './asyncToGenerator-7c654f36.js';
@@ -27,7 +27,7 @@ import { N as NavFooter } from './NavFooter-e27bd93b.js';
27
27
  import { S as SocialNavFooter } from './index.esm-73e847d2.js';
28
28
  import './SocialIcons.js';
29
29
  import 'react-bootstrap/FormControl';
30
- import { S as SocialSearchComponent } from './SocialSearchComponent-55960ec4.js';
30
+ import { S as SocialSearchComponent } from './SocialSearchComponent-75527dfe.js';
31
31
 
32
32
  var NavMagazine = function NavMagazine(props) {
33
33
  /*
@@ -307,7 +307,7 @@ var NavMagazine = function NavMagazine(props) {
307
307
  {
308
308
  id: 'navbar-ham',
309
309
  style: { width: '100%', display: 'flex', top: topOffset, overflow: 'auto', zIndex: '999999' },
310
- className: main_37 ? 'bottom-nav ios-nav' : 'bottom-nav ',
310
+ className: main_40 ? 'bottom-nav ios-nav' : 'bottom-nav ',
311
311
  variant: 'dark',
312
312
  expand: 'xl',
313
313
  bg: 'primary',
@@ -323,7 +323,7 @@ var NavMagazine = function NavMagazine(props) {
323
323
  'aria-controls': 'basic-navbar-nav',
324
324
  onClick: function onClick() {
325
325
  // Set overflow fix for iPhones safari browsers
326
- if (main_37) {
326
+ if (main_40) {
327
327
  var mainNav = document.querySelector('#navbar-ham');
328
328
  if (mainNav && mainNav.style) mainNav.style.overflow = 'auto';
329
329
  }
@@ -8,7 +8,7 @@ import './web.dom.iterable-8956f9a5.js';
8
8
  import React__default, { useRef, useState, useEffect } from 'react';
9
9
  import 'prop-types';
10
10
  import Container from 'react-bootstrap/Container';
11
- import { a as main_37 } from './main-5d1e4bd3.js';
11
+ import { a as main_40 } from './main-0465b2a0.js';
12
12
  import './stringify-008c8802.js';
13
13
  import { _ as _slicedToArray } from './slicedToArray-7021e5df.js';
14
14
  import './asyncToGenerator-7c654f36.js';
@@ -252,7 +252,7 @@ var NavNative = function NavNative(props) {
252
252
  React__default.createElement(
253
253
  Navbar,
254
254
  {
255
- className: main_37 ? 'bottom-nav ios-nav' : 'bottom-nav android-nav',
255
+ className: main_40 ? 'bottom-nav ios-nav' : 'bottom-nav android-nav',
256
256
  variant: 'dark',
257
257
  expand: 'lg',
258
258
  bg: 'primary',
@@ -1,7 +1,7 @@
1
1
  import './_commonjsHelpers-0c4b6f40.js';
2
2
  import React__default from 'react';
3
- import { m as moment } from './moment-e2f9b20c.js';
4
- import { i as imageUrlBuilder } from './index-73819142.js';
3
+ import { m as moment } from './moment-12415288.js';
4
+ import { i as imageUrlBuilder } from './index-51a80699.js';
5
5
  import './iconBase-602d52fe.js';
6
6
  import 'react-bootstrap/Badge';
7
7
  import './index.esm-9a4c8813.js';
@@ -5,9 +5,9 @@ import './core.get-iterator-method-54d2e411.js';
5
5
  import './web.dom.iterable-8956f9a5.js';
6
6
  import React__default from 'react';
7
7
  import 'prop-types';
8
- import { m as moment } from './moment-e2f9b20c.js';
8
+ import { m as moment } from './moment-12415288.js';
9
9
  import 'react-dom';
10
- import { i as imageUrlBuilder } from './index-73819142.js';
10
+ import { i as imageUrlBuilder } from './index-51a80699.js';
11
11
  import { L as LazyLoad } from './index-5f9f807a.js';
12
12
  import { c as clean_html_1 } from './entities-7cc3bf45.js';
13
13
  import './slicedToArray-7021e5df.js';