@mjhls/mjh-framework 1.0.939-nojs-pagination-v4 → 1.0.939-nojs-pagination-v5
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/dist/cjs/DeckContent.js +9 -7
- package/dist/cjs/GridContent.js +9 -7
- package/dist/cjs/MasterDeck.js +10 -9
- package/dist/cjs/VideoSeriesListing.js +11 -8
- package/dist/esm/DeckContent.js +9 -7
- package/dist/esm/GridContent.js +9 -7
- package/dist/esm/MasterDeck.js +10 -9
- package/dist/esm/VideoSeriesListing.js +11 -8
- package/package.json +1 -1
package/dist/cjs/DeckContent.js
CHANGED
|
@@ -76,8 +76,7 @@ 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
|
|
80
|
-
nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 3
|
|
79
|
+
itemsPerPage: _this.params.itemsPerPage || 3
|
|
81
80
|
}, _this.loadMore = debounce.debounce_1(function () {
|
|
82
81
|
_this.setState(function (state) {
|
|
83
82
|
var page = state.page,
|
|
@@ -381,7 +380,8 @@ var DeckContent = function (_React$Component) {
|
|
|
381
380
|
{ md: 12, style: { display: 'flex', flex: '1 0 auto' } },
|
|
382
381
|
rightItems[i].component
|
|
383
382
|
);
|
|
384
|
-
}, _this.renderManualPagination = function () {
|
|
383
|
+
}, _this.renderManualPagination = function (_ref2) {
|
|
384
|
+
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
385
385
|
var currentPage = _this.state.currentPage;
|
|
386
386
|
|
|
387
387
|
return React__default['default'].createElement(
|
|
@@ -392,7 +392,7 @@ var DeckContent = function (_React$Component) {
|
|
|
392
392
|
{ href: '?page=' + (currentPage - 1) },
|
|
393
393
|
'<< Previous'
|
|
394
394
|
),
|
|
395
|
-
!(_this.state.lastDataSize < _this.state.itemsPerPage) &&
|
|
395
|
+
!(_this.state.lastDataSize < _this.state.itemsPerPage) && nextPagePostsCount > 0 && React__default['default'].createElement(
|
|
396
396
|
'a',
|
|
397
397
|
{ href: '?page=' + (currentPage + 1) },
|
|
398
398
|
'Next >>'
|
|
@@ -436,7 +436,9 @@ var DeckContent = function (_React$Component) {
|
|
|
436
436
|
page = _props.page,
|
|
437
437
|
showBI = _props.showBI,
|
|
438
438
|
brandInsight = _props.brandInsight,
|
|
439
|
-
biStart = _props.biStart
|
|
439
|
+
biStart = _props.biStart,
|
|
440
|
+
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
441
|
+
nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC;
|
|
440
442
|
|
|
441
443
|
|
|
442
444
|
return React__default['default'].createElement(
|
|
@@ -457,7 +459,7 @@ var DeckContent = function (_React$Component) {
|
|
|
457
459
|
React__default['default'].createElement(
|
|
458
460
|
'noscript',
|
|
459
461
|
null,
|
|
460
|
-
this.renderManualPagination()
|
|
462
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
461
463
|
)
|
|
462
464
|
) : React__default['default'].createElement(
|
|
463
465
|
React__default['default'].Fragment,
|
|
@@ -491,7 +493,7 @@ var DeckContent = function (_React$Component) {
|
|
|
491
493
|
React__default['default'].createElement(
|
|
492
494
|
'noscript',
|
|
493
495
|
null,
|
|
494
|
-
this.renderManualPagination()
|
|
496
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
495
497
|
)
|
|
496
498
|
)
|
|
497
499
|
);
|
package/dist/cjs/GridContent.js
CHANGED
|
@@ -86,8 +86,7 @@ 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
|
|
90
|
-
nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 3
|
|
89
|
+
lastDataSize: _this.data ? _this.data.length : 0
|
|
91
90
|
}, _this.loadMore = debounce.debounce_1(function () {
|
|
92
91
|
_this.setState(function (state) {
|
|
93
92
|
var page = state.page,
|
|
@@ -240,7 +239,8 @@ var GridContent = function (_React$Component) {
|
|
|
240
239
|
{ style: { display: 'flex', flex: '1 0 auto' } },
|
|
241
240
|
rightItems[i].component
|
|
242
241
|
);
|
|
243
|
-
}, _this.renderManualPagination = function () {
|
|
242
|
+
}, _this.renderManualPagination = function (_ref2) {
|
|
243
|
+
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
244
244
|
var currentPage = _this.state.currentPage;
|
|
245
245
|
|
|
246
246
|
return React__default['default'].createElement(
|
|
@@ -251,7 +251,7 @@ var GridContent = function (_React$Component) {
|
|
|
251
251
|
{ href: '?page=' + (currentPage - 1) },
|
|
252
252
|
'<< Previous'
|
|
253
253
|
),
|
|
254
|
-
!(_this.state.lastDataSize < _this.state.itemsPerPage) &&
|
|
254
|
+
!(_this.state.lastDataSize < _this.state.itemsPerPage) && nextPagePostsCount > 0 && React__default['default'].createElement(
|
|
255
255
|
'a',
|
|
256
256
|
{ href: '?page=' + (currentPage + 1) },
|
|
257
257
|
'Next >>'
|
|
@@ -743,7 +743,9 @@ var GridContent = function (_React$Component) {
|
|
|
743
743
|
showVideo = _props.showVideo,
|
|
744
744
|
VideoPlayer = _props.VideoPlayer,
|
|
745
745
|
showBI = _props.showBI,
|
|
746
|
-
brandInsight = _props.brandInsight
|
|
746
|
+
brandInsight = _props.brandInsight,
|
|
747
|
+
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
748
|
+
nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC;
|
|
747
749
|
|
|
748
750
|
|
|
749
751
|
return React__default['default'].createElement(
|
|
@@ -764,7 +766,7 @@ var GridContent = function (_React$Component) {
|
|
|
764
766
|
React__default['default'].createElement(
|
|
765
767
|
'noscript',
|
|
766
768
|
null,
|
|
767
|
-
this.renderManualPagination()
|
|
769
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
768
770
|
)
|
|
769
771
|
) : React__default['default'].createElement(
|
|
770
772
|
React__default['default'].Fragment,
|
|
@@ -798,7 +800,7 @@ var GridContent = function (_React$Component) {
|
|
|
798
800
|
React__default['default'].createElement(
|
|
799
801
|
'noscript',
|
|
800
802
|
null,
|
|
801
|
-
this.renderManualPagination()
|
|
803
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
802
804
|
)
|
|
803
805
|
)
|
|
804
806
|
);
|
package/dist/cjs/MasterDeck.js
CHANGED
|
@@ -75,8 +75,7 @@ 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
|
|
79
|
-
nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 2
|
|
78
|
+
mobileView: false
|
|
80
79
|
}, _this.loadMore = debounce.debounce_1(function () {
|
|
81
80
|
_this.setState(function (state) {
|
|
82
81
|
var page = state.page,
|
|
@@ -404,16 +403,16 @@ var MasterDeck = function (_React$Component) {
|
|
|
404
403
|
{ className: 'ad-container', style: { display: 'flex', flex: '1 0 auto', width: '100%', textAlign: 'center', marginBottom: '2rem' } },
|
|
405
404
|
rightItems[i].component
|
|
406
405
|
);
|
|
407
|
-
}, _this.renderManualPagination = function () {
|
|
406
|
+
}, _this.renderManualPagination = function (_ref2) {
|
|
407
|
+
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
408
408
|
var _this$state3 = _this.state,
|
|
409
409
|
currentPage = _this$state3.currentPage,
|
|
410
410
|
itemsPerPage = _this$state3.itemsPerPage,
|
|
411
|
-
lastDataSize = _this$state3.lastDataSize
|
|
412
|
-
nextPagePostsCount = _this$state3.nextPagePostsCount;
|
|
411
|
+
lastDataSize = _this$state3.lastDataSize;
|
|
413
412
|
|
|
414
413
|
console.log('lastDataSize:', lastDataSize);
|
|
415
414
|
console.log('itemsPerPage:', itemsPerPage);
|
|
416
|
-
|
|
415
|
+
console.log('nextPagePostsCount:', nextPagePostsCount);
|
|
417
416
|
return React__default['default'].createElement(
|
|
418
417
|
'div',
|
|
419
418
|
{ className: 'd-flex justify-content-between' },
|
|
@@ -484,7 +483,9 @@ var MasterDeck = function (_React$Component) {
|
|
|
484
483
|
_props$showBI = _props.showBI,
|
|
485
484
|
showBI = _props$showBI === undefined ? false : _props$showBI,
|
|
486
485
|
_props$lgInfeedAd = _props.lgInfeedAd,
|
|
487
|
-
lgInfeedAd = _props$lgInfeedAd === undefined ? false : _props$lgInfeedAd
|
|
486
|
+
lgInfeedAd = _props$lgInfeedAd === undefined ? false : _props$lgInfeedAd,
|
|
487
|
+
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
488
|
+
nextPagePostsCount = _props$nextPagePostsC === undefined ? 2 : _props$nextPagePostsC;
|
|
488
489
|
|
|
489
490
|
return React__default['default'].createElement(
|
|
490
491
|
'div',
|
|
@@ -504,7 +505,7 @@ var MasterDeck = function (_React$Component) {
|
|
|
504
505
|
React__default['default'].createElement(
|
|
505
506
|
'noscript',
|
|
506
507
|
null,
|
|
507
|
-
this.renderManualPagination()
|
|
508
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
508
509
|
)
|
|
509
510
|
) : React__default['default'].createElement(
|
|
510
511
|
React__default['default'].Fragment,
|
|
@@ -540,7 +541,7 @@ var MasterDeck = function (_React$Component) {
|
|
|
540
541
|
React__default['default'].createElement(
|
|
541
542
|
'noscript',
|
|
542
543
|
null,
|
|
543
|
-
this.renderManualPagination()
|
|
544
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
544
545
|
)
|
|
545
546
|
)
|
|
546
547
|
);
|
|
@@ -87,8 +87,7 @@ 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
|
|
91
|
-
nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 2
|
|
90
|
+
lastDataSize: _this.data ? _this.data.length : 0
|
|
92
91
|
}, _this.loadMore = debounce.debounce_1(function () {
|
|
93
92
|
_this.setState(function (state) {
|
|
94
93
|
var page = state.page,
|
|
@@ -202,7 +201,8 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
202
201
|
});
|
|
203
202
|
}
|
|
204
203
|
}
|
|
205
|
-
}, _this.renderManualPagination = function () {
|
|
204
|
+
}, _this.renderManualPagination = function (_ref2) {
|
|
205
|
+
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
206
206
|
var currentPage = _this.state.currentPage;
|
|
207
207
|
|
|
208
208
|
|
|
@@ -214,7 +214,7 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
214
214
|
{ href: '?page=' + (currentPage - 1) },
|
|
215
215
|
'<< Previous'
|
|
216
216
|
),
|
|
217
|
-
!(_this.state.lastDataSize < _this.state.per) &&
|
|
217
|
+
!(_this.state.lastDataSize < _this.state.per) && nextPagePostsCount > 0 && React__default['default'].createElement(
|
|
218
218
|
'a',
|
|
219
219
|
{ href: '?page=' + (currentPage + 1) },
|
|
220
220
|
'Next >>'
|
|
@@ -273,8 +273,11 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
273
273
|
value: function render() {
|
|
274
274
|
var _this2 = this;
|
|
275
275
|
|
|
276
|
-
var _props
|
|
277
|
-
|
|
276
|
+
var _props = this.props,
|
|
277
|
+
_props$autoScroll = _props.autoScroll,
|
|
278
|
+
autoScroll = _props$autoScroll === undefined ? true : _props$autoScroll,
|
|
279
|
+
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
280
|
+
nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC;
|
|
278
281
|
|
|
279
282
|
|
|
280
283
|
if (autoScroll) {
|
|
@@ -313,7 +316,7 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
313
316
|
React__default['default'].createElement(
|
|
314
317
|
'noscript',
|
|
315
318
|
null,
|
|
316
|
-
this.renderManualPagination()
|
|
319
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
317
320
|
)
|
|
318
321
|
)
|
|
319
322
|
) : React__default['default'].createElement(
|
|
@@ -390,7 +393,7 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
390
393
|
React__default['default'].createElement(
|
|
391
394
|
'noscript',
|
|
392
395
|
null,
|
|
393
|
-
_this2.renderManualPagination()
|
|
396
|
+
_this2.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
394
397
|
)
|
|
395
398
|
);
|
|
396
399
|
})
|
package/dist/esm/DeckContent.js
CHANGED
|
@@ -66,8 +66,7 @@ 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
|
|
70
|
-
nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 3
|
|
69
|
+
itemsPerPage: _this.params.itemsPerPage || 3
|
|
71
70
|
}, _this.loadMore = debounce_1(function () {
|
|
72
71
|
_this.setState(function (state) {
|
|
73
72
|
var page = state.page,
|
|
@@ -371,7 +370,8 @@ var DeckContent = function (_React$Component) {
|
|
|
371
370
|
{ md: 12, style: { display: 'flex', flex: '1 0 auto' } },
|
|
372
371
|
rightItems[i].component
|
|
373
372
|
);
|
|
374
|
-
}, _this.renderManualPagination = function () {
|
|
373
|
+
}, _this.renderManualPagination = function (_ref2) {
|
|
374
|
+
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
375
375
|
var currentPage = _this.state.currentPage;
|
|
376
376
|
|
|
377
377
|
return React__default.createElement(
|
|
@@ -382,7 +382,7 @@ var DeckContent = function (_React$Component) {
|
|
|
382
382
|
{ href: '?page=' + (currentPage - 1) },
|
|
383
383
|
'<< Previous'
|
|
384
384
|
),
|
|
385
|
-
!(_this.state.lastDataSize < _this.state.itemsPerPage) &&
|
|
385
|
+
!(_this.state.lastDataSize < _this.state.itemsPerPage) && nextPagePostsCount > 0 && React__default.createElement(
|
|
386
386
|
'a',
|
|
387
387
|
{ href: '?page=' + (currentPage + 1) },
|
|
388
388
|
'Next >>'
|
|
@@ -426,7 +426,9 @@ var DeckContent = function (_React$Component) {
|
|
|
426
426
|
page = _props.page,
|
|
427
427
|
showBI = _props.showBI,
|
|
428
428
|
brandInsight = _props.brandInsight,
|
|
429
|
-
biStart = _props.biStart
|
|
429
|
+
biStart = _props.biStart,
|
|
430
|
+
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
431
|
+
nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC;
|
|
430
432
|
|
|
431
433
|
|
|
432
434
|
return React__default.createElement(
|
|
@@ -447,7 +449,7 @@ var DeckContent = function (_React$Component) {
|
|
|
447
449
|
React__default.createElement(
|
|
448
450
|
'noscript',
|
|
449
451
|
null,
|
|
450
|
-
this.renderManualPagination()
|
|
452
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
451
453
|
)
|
|
452
454
|
) : React__default.createElement(
|
|
453
455
|
React__default.Fragment,
|
|
@@ -481,7 +483,7 @@ var DeckContent = function (_React$Component) {
|
|
|
481
483
|
React__default.createElement(
|
|
482
484
|
'noscript',
|
|
483
485
|
null,
|
|
484
|
-
this.renderManualPagination()
|
|
486
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
485
487
|
)
|
|
486
488
|
)
|
|
487
489
|
);
|
package/dist/esm/GridContent.js
CHANGED
|
@@ -76,8 +76,7 @@ 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
|
|
80
|
-
nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 3
|
|
79
|
+
lastDataSize: _this.data ? _this.data.length : 0
|
|
81
80
|
}, _this.loadMore = debounce_1(function () {
|
|
82
81
|
_this.setState(function (state) {
|
|
83
82
|
var page = state.page,
|
|
@@ -230,7 +229,8 @@ var GridContent = function (_React$Component) {
|
|
|
230
229
|
{ style: { display: 'flex', flex: '1 0 auto' } },
|
|
231
230
|
rightItems[i].component
|
|
232
231
|
);
|
|
233
|
-
}, _this.renderManualPagination = function () {
|
|
232
|
+
}, _this.renderManualPagination = function (_ref2) {
|
|
233
|
+
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
234
234
|
var currentPage = _this.state.currentPage;
|
|
235
235
|
|
|
236
236
|
return React__default.createElement(
|
|
@@ -241,7 +241,7 @@ var GridContent = function (_React$Component) {
|
|
|
241
241
|
{ href: '?page=' + (currentPage - 1) },
|
|
242
242
|
'<< Previous'
|
|
243
243
|
),
|
|
244
|
-
!(_this.state.lastDataSize < _this.state.itemsPerPage) &&
|
|
244
|
+
!(_this.state.lastDataSize < _this.state.itemsPerPage) && nextPagePostsCount > 0 && React__default.createElement(
|
|
245
245
|
'a',
|
|
246
246
|
{ href: '?page=' + (currentPage + 1) },
|
|
247
247
|
'Next >>'
|
|
@@ -733,7 +733,9 @@ var GridContent = function (_React$Component) {
|
|
|
733
733
|
showVideo = _props.showVideo,
|
|
734
734
|
VideoPlayer = _props.VideoPlayer,
|
|
735
735
|
showBI = _props.showBI,
|
|
736
|
-
brandInsight = _props.brandInsight
|
|
736
|
+
brandInsight = _props.brandInsight,
|
|
737
|
+
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
738
|
+
nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC;
|
|
737
739
|
|
|
738
740
|
|
|
739
741
|
return React__default.createElement(
|
|
@@ -754,7 +756,7 @@ var GridContent = function (_React$Component) {
|
|
|
754
756
|
React__default.createElement(
|
|
755
757
|
'noscript',
|
|
756
758
|
null,
|
|
757
|
-
this.renderManualPagination()
|
|
759
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
758
760
|
)
|
|
759
761
|
) : React__default.createElement(
|
|
760
762
|
React__default.Fragment,
|
|
@@ -788,7 +790,7 @@ var GridContent = function (_React$Component) {
|
|
|
788
790
|
React__default.createElement(
|
|
789
791
|
'noscript',
|
|
790
792
|
null,
|
|
791
|
-
this.renderManualPagination()
|
|
793
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
792
794
|
)
|
|
793
795
|
)
|
|
794
796
|
);
|
package/dist/esm/MasterDeck.js
CHANGED
|
@@ -68,8 +68,7 @@ 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
|
|
72
|
-
nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 2
|
|
71
|
+
mobileView: false
|
|
73
72
|
}, _this.loadMore = debounce_1(function () {
|
|
74
73
|
_this.setState(function (state) {
|
|
75
74
|
var page = state.page,
|
|
@@ -397,16 +396,16 @@ var MasterDeck = function (_React$Component) {
|
|
|
397
396
|
{ className: 'ad-container', style: { display: 'flex', flex: '1 0 auto', width: '100%', textAlign: 'center', marginBottom: '2rem' } },
|
|
398
397
|
rightItems[i].component
|
|
399
398
|
);
|
|
400
|
-
}, _this.renderManualPagination = function () {
|
|
399
|
+
}, _this.renderManualPagination = function (_ref2) {
|
|
400
|
+
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
401
401
|
var _this$state3 = _this.state,
|
|
402
402
|
currentPage = _this$state3.currentPage,
|
|
403
403
|
itemsPerPage = _this$state3.itemsPerPage,
|
|
404
|
-
lastDataSize = _this$state3.lastDataSize
|
|
405
|
-
nextPagePostsCount = _this$state3.nextPagePostsCount;
|
|
404
|
+
lastDataSize = _this$state3.lastDataSize;
|
|
406
405
|
|
|
407
406
|
console.log('lastDataSize:', lastDataSize);
|
|
408
407
|
console.log('itemsPerPage:', itemsPerPage);
|
|
409
|
-
|
|
408
|
+
console.log('nextPagePostsCount:', nextPagePostsCount);
|
|
410
409
|
return React__default.createElement(
|
|
411
410
|
'div',
|
|
412
411
|
{ className: 'd-flex justify-content-between' },
|
|
@@ -477,7 +476,9 @@ var MasterDeck = function (_React$Component) {
|
|
|
477
476
|
_props$showBI = _props.showBI,
|
|
478
477
|
showBI = _props$showBI === undefined ? false : _props$showBI,
|
|
479
478
|
_props$lgInfeedAd = _props.lgInfeedAd,
|
|
480
|
-
lgInfeedAd = _props$lgInfeedAd === undefined ? false : _props$lgInfeedAd
|
|
479
|
+
lgInfeedAd = _props$lgInfeedAd === undefined ? false : _props$lgInfeedAd,
|
|
480
|
+
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
481
|
+
nextPagePostsCount = _props$nextPagePostsC === undefined ? 2 : _props$nextPagePostsC;
|
|
481
482
|
|
|
482
483
|
return React__default.createElement(
|
|
483
484
|
'div',
|
|
@@ -497,7 +498,7 @@ var MasterDeck = function (_React$Component) {
|
|
|
497
498
|
React__default.createElement(
|
|
498
499
|
'noscript',
|
|
499
500
|
null,
|
|
500
|
-
this.renderManualPagination()
|
|
501
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
501
502
|
)
|
|
502
503
|
) : React__default.createElement(
|
|
503
504
|
React__default.Fragment,
|
|
@@ -533,7 +534,7 @@ var MasterDeck = function (_React$Component) {
|
|
|
533
534
|
React__default.createElement(
|
|
534
535
|
'noscript',
|
|
535
536
|
null,
|
|
536
|
-
this.renderManualPagination()
|
|
537
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
537
538
|
)
|
|
538
539
|
)
|
|
539
540
|
);
|
|
@@ -80,8 +80,7 @@ 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
|
|
84
|
-
nextPagePostsCount: _this.props.nextPagePostsCount ? _this.props.nextPagePostsCount : 2
|
|
83
|
+
lastDataSize: _this.data ? _this.data.length : 0
|
|
85
84
|
}, _this.loadMore = debounce_1(function () {
|
|
86
85
|
_this.setState(function (state) {
|
|
87
86
|
var page = state.page,
|
|
@@ -195,7 +194,8 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
195
194
|
});
|
|
196
195
|
}
|
|
197
196
|
}
|
|
198
|
-
}, _this.renderManualPagination = function () {
|
|
197
|
+
}, _this.renderManualPagination = function (_ref2) {
|
|
198
|
+
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
199
199
|
var currentPage = _this.state.currentPage;
|
|
200
200
|
|
|
201
201
|
|
|
@@ -207,7 +207,7 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
207
207
|
{ href: '?page=' + (currentPage - 1) },
|
|
208
208
|
'<< Previous'
|
|
209
209
|
),
|
|
210
|
-
!(_this.state.lastDataSize < _this.state.per) &&
|
|
210
|
+
!(_this.state.lastDataSize < _this.state.per) && nextPagePostsCount > 0 && React__default.createElement(
|
|
211
211
|
'a',
|
|
212
212
|
{ href: '?page=' + (currentPage + 1) },
|
|
213
213
|
'Next >>'
|
|
@@ -266,8 +266,11 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
266
266
|
value: function render() {
|
|
267
267
|
var _this2 = this;
|
|
268
268
|
|
|
269
|
-
var _props
|
|
270
|
-
|
|
269
|
+
var _props = this.props,
|
|
270
|
+
_props$autoScroll = _props.autoScroll,
|
|
271
|
+
autoScroll = _props$autoScroll === undefined ? true : _props$autoScroll,
|
|
272
|
+
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
273
|
+
nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC;
|
|
271
274
|
|
|
272
275
|
|
|
273
276
|
if (autoScroll) {
|
|
@@ -306,7 +309,7 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
306
309
|
React__default.createElement(
|
|
307
310
|
'noscript',
|
|
308
311
|
null,
|
|
309
|
-
this.renderManualPagination()
|
|
312
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
310
313
|
)
|
|
311
314
|
)
|
|
312
315
|
) : React__default.createElement(
|
|
@@ -383,7 +386,7 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
383
386
|
React__default.createElement(
|
|
384
387
|
'noscript',
|
|
385
388
|
null,
|
|
386
|
-
_this2.renderManualPagination()
|
|
389
|
+
_this2.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
387
390
|
)
|
|
388
391
|
);
|
|
389
392
|
})
|