@mjhls/mjh-framework 1.0.939-nojs-pagination-v3 → 1.0.939-nojs-pagination-v4

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.
@@ -76,7 +76,8 @@ var DeckContent = function (_React$Component) {
76
76
  query: _this.query,
77
77
  currentPage: _this.props.currentPage || 1,
78
78
  lastDataSize: _this.data ? _this.data.length : 0,
79
- itemsPerPage: _this.params.itemsPerPage || 3
79
+ itemsPerPage: _this.params.itemsPerPage || 3,
80
+ nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 3
80
81
  }, _this.loadMore = debounce.debounce_1(function () {
81
82
  _this.setState(function (state) {
82
83
  var page = state.page,
@@ -391,7 +392,7 @@ var DeckContent = function (_React$Component) {
391
392
  { href: '?page=' + (currentPage - 1) },
392
393
  '<< Previous'
393
394
  ),
394
- !(_this.state.lastDataSize < _this.state.itemsPerPage) && React__default['default'].createElement(
395
+ !(_this.state.lastDataSize < _this.state.itemsPerPage) && _this.state.nextPagePostsCount > 0 && React__default['default'].createElement(
395
396
  'a',
396
397
  { href: '?page=' + (currentPage + 1) },
397
398
  'Next >>'
@@ -86,7 +86,8 @@ var GridContent = function (_React$Component) {
86
86
  lgInfeedAd: _this.props.lgInfeedAd ? _this.props.lgInfeedAd : false,
87
87
  showCategory: _this.props.showCategory ? _this.props.showCategory : false,
88
88
  contentCategoryMapping: _this.props.contentCategoryMapping ? contentCategoryMapping : [],
89
- lastDataSize: _this.data ? _this.data.length : 0
89
+ lastDataSize: _this.data ? _this.data.length : 0,
90
+ nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 3
90
91
  }, _this.loadMore = debounce.debounce_1(function () {
91
92
  _this.setState(function (state) {
92
93
  var page = state.page,
@@ -250,7 +251,7 @@ var GridContent = function (_React$Component) {
250
251
  { href: '?page=' + (currentPage - 1) },
251
252
  '<< Previous'
252
253
  ),
253
- !(_this.state.lastDataSize < _this.state.per) && React__default['default'].createElement(
254
+ !(_this.state.lastDataSize < _this.state.itemsPerPage) && _this.state.nextPagePostsCount > 0 && React__default['default'].createElement(
254
255
  'a',
255
256
  { href: '?page=' + (currentPage + 1) },
256
257
  'Next >>'
@@ -75,7 +75,8 @@ var MasterDeck = function (_React$Component) {
75
75
  dataRemapped: !_this.props.showBI || !_this.props.brandInsightAd,
76
76
  lastDataSize: _this.data ? _this.data.length : 0,
77
77
  itemsPerPage: _this.params ? _this.params.to - _this.params.from : 2,
78
- mobileView: false
78
+ mobileView: false,
79
+ nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 2
79
80
  }, _this.loadMore = debounce.debounce_1(function () {
80
81
  _this.setState(function (state) {
81
82
  var page = state.page,
@@ -407,7 +408,8 @@ var MasterDeck = function (_React$Component) {
407
408
  var _this$state3 = _this.state,
408
409
  currentPage = _this$state3.currentPage,
409
410
  itemsPerPage = _this$state3.itemsPerPage,
410
- lastDataSize = _this$state3.lastDataSize;
411
+ lastDataSize = _this$state3.lastDataSize,
412
+ nextPagePostsCount = _this$state3.nextPagePostsCount;
411
413
 
412
414
  console.log('lastDataSize:', lastDataSize);
413
415
  console.log('itemsPerPage:', itemsPerPage);
@@ -420,7 +422,7 @@ var MasterDeck = function (_React$Component) {
420
422
  { href: '?page=' + (currentPage - 1) },
421
423
  '<< Previous'
422
424
  ),
423
- !(lastDataSize < itemsPerPage) && React__default['default'].createElement(
425
+ !(lastDataSize < itemsPerPage) && nextPagePostsCount > 0 && React__default['default'].createElement(
424
426
  'a',
425
427
  { href: '?page=' + (currentPage + 1) },
426
428
  'Next >>'
@@ -1367,6 +1367,8 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
1367
1367
  imageFit = props.imageFit,
1368
1368
  rightItems = props.rightItems,
1369
1369
  brandInsightAd = props.brandInsightAd,
1370
+ _props$nextPagePostsC = props.nextPagePostsCount,
1371
+ nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC,
1370
1372
  _props$showBI = props.showBI,
1371
1373
  showBI = _props$showBI === undefined ? false : _props$showBI,
1372
1374
  _props$heroContent = props.heroContent,
@@ -1428,7 +1430,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
1428
1430
  { href: '?page=' + (currentPage - 1) },
1429
1431
  '<< Previous'
1430
1432
  ),
1431
- !(lastDataSize < itemsPerPage) && React__default['default'].createElement(
1433
+ !(lastDataSize < itemsPerPage) && nextPagePostsCount > 0 && React__default['default'].createElement(
1432
1434
  'a',
1433
1435
  { href: '?page=' + (currentPage + 1) },
1434
1436
  'Next >>'
@@ -87,7 +87,8 @@ var VideoSeriesListing = function (_React$Component) {
87
87
  scrolling: true,
88
88
  query: _this.query,
89
89
  currentPage: _this.props.currentPage || 1,
90
- lastDataSize: _this.data ? _this.data.length : 0
90
+ lastDataSize: _this.data ? _this.data.length : 0,
91
+ nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 2
91
92
  }, _this.loadMore = debounce.debounce_1(function () {
92
93
  _this.setState(function (state) {
93
94
  var page = state.page,
@@ -213,7 +214,7 @@ var VideoSeriesListing = function (_React$Component) {
213
214
  { href: '?page=' + (currentPage - 1) },
214
215
  '<< Previous'
215
216
  ),
216
- !(_this.state.lastDataSize < _this.state.per) && React__default['default'].createElement(
217
+ !(_this.state.lastDataSize < _this.state.per) && _this.state.nextPagePostsCount > 0 && React__default['default'].createElement(
217
218
  'a',
218
219
  { href: '?page=' + (currentPage + 1) },
219
220
  'Next >>'
@@ -66,7 +66,8 @@ var DeckContent = function (_React$Component) {
66
66
  query: _this.query,
67
67
  currentPage: _this.props.currentPage || 1,
68
68
  lastDataSize: _this.data ? _this.data.length : 0,
69
- itemsPerPage: _this.params.itemsPerPage || 3
69
+ itemsPerPage: _this.params.itemsPerPage || 3,
70
+ nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 3
70
71
  }, _this.loadMore = debounce_1(function () {
71
72
  _this.setState(function (state) {
72
73
  var page = state.page,
@@ -381,7 +382,7 @@ var DeckContent = function (_React$Component) {
381
382
  { href: '?page=' + (currentPage - 1) },
382
383
  '<< Previous'
383
384
  ),
384
- !(_this.state.lastDataSize < _this.state.itemsPerPage) && React__default.createElement(
385
+ !(_this.state.lastDataSize < _this.state.itemsPerPage) && _this.state.nextPagePostsCount > 0 && React__default.createElement(
385
386
  'a',
386
387
  { href: '?page=' + (currentPage + 1) },
387
388
  'Next >>'
@@ -76,7 +76,8 @@ var GridContent = function (_React$Component) {
76
76
  lgInfeedAd: _this.props.lgInfeedAd ? _this.props.lgInfeedAd : false,
77
77
  showCategory: _this.props.showCategory ? _this.props.showCategory : false,
78
78
  contentCategoryMapping: _this.props.contentCategoryMapping ? contentCategoryMapping : [],
79
- lastDataSize: _this.data ? _this.data.length : 0
79
+ lastDataSize: _this.data ? _this.data.length : 0,
80
+ nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 3
80
81
  }, _this.loadMore = debounce_1(function () {
81
82
  _this.setState(function (state) {
82
83
  var page = state.page,
@@ -240,7 +241,7 @@ var GridContent = function (_React$Component) {
240
241
  { href: '?page=' + (currentPage - 1) },
241
242
  '<< Previous'
242
243
  ),
243
- !(_this.state.lastDataSize < _this.state.per) && React__default.createElement(
244
+ !(_this.state.lastDataSize < _this.state.itemsPerPage) && _this.state.nextPagePostsCount > 0 && React__default.createElement(
244
245
  'a',
245
246
  { href: '?page=' + (currentPage + 1) },
246
247
  'Next >>'
@@ -68,7 +68,8 @@ var MasterDeck = function (_React$Component) {
68
68
  dataRemapped: !_this.props.showBI || !_this.props.brandInsightAd,
69
69
  lastDataSize: _this.data ? _this.data.length : 0,
70
70
  itemsPerPage: _this.params ? _this.params.to - _this.params.from : 2,
71
- mobileView: false
71
+ mobileView: false,
72
+ nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 2
72
73
  }, _this.loadMore = debounce_1(function () {
73
74
  _this.setState(function (state) {
74
75
  var page = state.page,
@@ -400,7 +401,8 @@ var MasterDeck = function (_React$Component) {
400
401
  var _this$state3 = _this.state,
401
402
  currentPage = _this$state3.currentPage,
402
403
  itemsPerPage = _this$state3.itemsPerPage,
403
- lastDataSize = _this$state3.lastDataSize;
404
+ lastDataSize = _this$state3.lastDataSize,
405
+ nextPagePostsCount = _this$state3.nextPagePostsCount;
404
406
 
405
407
  console.log('lastDataSize:', lastDataSize);
406
408
  console.log('itemsPerPage:', itemsPerPage);
@@ -413,7 +415,7 @@ var MasterDeck = function (_React$Component) {
413
415
  { href: '?page=' + (currentPage - 1) },
414
416
  '<< Previous'
415
417
  ),
416
- !(lastDataSize < itemsPerPage) && React__default.createElement(
418
+ !(lastDataSize < itemsPerPage) && nextPagePostsCount > 0 && React__default.createElement(
417
419
  'a',
418
420
  { href: '?page=' + (currentPage + 1) },
419
421
  'Next >>'
@@ -1361,6 +1361,8 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
1361
1361
  imageFit = props.imageFit,
1362
1362
  rightItems = props.rightItems,
1363
1363
  brandInsightAd = props.brandInsightAd,
1364
+ _props$nextPagePostsC = props.nextPagePostsCount,
1365
+ nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC,
1364
1366
  _props$showBI = props.showBI,
1365
1367
  showBI = _props$showBI === undefined ? false : _props$showBI,
1366
1368
  _props$heroContent = props.heroContent,
@@ -1422,7 +1424,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
1422
1424
  { href: '?page=' + (currentPage - 1) },
1423
1425
  '<< Previous'
1424
1426
  ),
1425
- !(lastDataSize < itemsPerPage) && React__default.createElement(
1427
+ !(lastDataSize < itemsPerPage) && nextPagePostsCount > 0 && React__default.createElement(
1426
1428
  'a',
1427
1429
  { href: '?page=' + (currentPage + 1) },
1428
1430
  'Next >>'
@@ -80,7 +80,8 @@ var VideoSeriesListing = function (_React$Component) {
80
80
  scrolling: true,
81
81
  query: _this.query,
82
82
  currentPage: _this.props.currentPage || 1,
83
- lastDataSize: _this.data ? _this.data.length : 0
83
+ lastDataSize: _this.data ? _this.data.length : 0,
84
+ nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 2
84
85
  }, _this.loadMore = debounce_1(function () {
85
86
  _this.setState(function (state) {
86
87
  var page = state.page,
@@ -206,7 +207,7 @@ var VideoSeriesListing = function (_React$Component) {
206
207
  { href: '?page=' + (currentPage - 1) },
207
208
  '<< Previous'
208
209
  ),
209
- !(_this.state.lastDataSize < _this.state.per) && React__default.createElement(
210
+ !(_this.state.lastDataSize < _this.state.per) && _this.state.nextPagePostsCount > 0 && React__default.createElement(
210
211
  'a',
211
212
  { href: '?page=' + (currentPage + 1) },
212
213
  'Next >>'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.939-nojs-pagination-v3",
3
+ "version": "1.0.939-nojs-pagination-v4",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",