@mjhls/mjh-framework 1.0.645 → 1.0.646
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 +1 -1
- package/dist/cjs/MasterDeck.js +2 -1
- package/dist/cjs/VideoSeriesListing.js +94 -18
- package/dist/cjs/View.js +4 -2
- package/dist/esm/MasterDeck.js +2 -1
- package/dist/esm/VideoSeriesListing.js +94 -18
- package/dist/esm/View.js +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/MasterDeck.js
CHANGED
|
@@ -481,7 +481,8 @@ var MasterDeck = function (_React$Component) {
|
|
|
481
481
|
this.state.scrolling ? React__default.createElement(
|
|
482
482
|
'button',
|
|
483
483
|
{
|
|
484
|
-
|
|
484
|
+
className: 'btn',
|
|
485
|
+
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' },
|
|
485
486
|
onClick: function onClick(e) {
|
|
486
487
|
_this3.loadMore();
|
|
487
488
|
} },
|
|
@@ -229,17 +229,74 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
inherits._createClass(VideoSeriesListing, [{
|
|
232
|
+
key: 'componentDidMount',
|
|
233
|
+
value: function componentDidMount() {
|
|
234
|
+
console.log(this.state);
|
|
235
|
+
}
|
|
236
|
+
}, {
|
|
232
237
|
key: 'render',
|
|
233
238
|
value: function render() {
|
|
234
239
|
var _this2 = this;
|
|
235
240
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
var _props$autoScroll = this.props.autoScroll,
|
|
242
|
+
autoScroll = _props$autoScroll === undefined ? true : _props$autoScroll;
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
if (autoScroll) {
|
|
246
|
+
return React__default.createElement(
|
|
247
|
+
React__default.Fragment,
|
|
248
|
+
null,
|
|
249
|
+
this.state.data.length >= 1 && this.state.data[0].length > 0 ?
|
|
250
|
+
//Check if any Video Groups available
|
|
251
|
+
React__default.createElement(
|
|
252
|
+
index_es.InfiniteScroll,
|
|
253
|
+
{ dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling, scrollThreshold: 0.8 },
|
|
254
|
+
React__default.createElement(
|
|
255
|
+
Container,
|
|
256
|
+
null,
|
|
257
|
+
this.state.data && this.state.data.map(function (series, index) {
|
|
258
|
+
var page = series && series.length > 0 && series[0].pageNumber !== 1 ? series[0].pageNumber : 1;
|
|
259
|
+
|
|
260
|
+
return React__default.createElement(
|
|
261
|
+
React__default.Fragment,
|
|
262
|
+
{ key: index },
|
|
263
|
+
React__default.createElement(
|
|
264
|
+
visibilitySensor.VisibilitySensor,
|
|
265
|
+
{
|
|
266
|
+
onChange: function onChange(isVisible) {
|
|
267
|
+
isVisible && _this2.changePageNumber(page);
|
|
268
|
+
} },
|
|
269
|
+
React__default.createElement('div', { className: 'visibility-sensor', style: { minHeight: '.25rem' } })
|
|
270
|
+
),
|
|
271
|
+
React__default.createElement(
|
|
272
|
+
'div',
|
|
273
|
+
null,
|
|
274
|
+
_this2.renderSeries(series)
|
|
275
|
+
)
|
|
276
|
+
);
|
|
277
|
+
})
|
|
278
|
+
)
|
|
279
|
+
) : React__default.createElement(
|
|
280
|
+
'div',
|
|
281
|
+
{ style: { marginTop: '10px' } },
|
|
282
|
+
React__default.createElement(
|
|
283
|
+
'h5',
|
|
284
|
+
null,
|
|
285
|
+
React__default.createElement(
|
|
286
|
+
'em',
|
|
287
|
+
null,
|
|
288
|
+
'New content coming soon, please check back later.'
|
|
289
|
+
)
|
|
290
|
+
)
|
|
291
|
+
)
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
if (!autoScroll) {
|
|
295
|
+
return React__default.createElement(
|
|
296
|
+
React__default.Fragment,
|
|
297
|
+
null,
|
|
298
|
+
this.state.data.length >= 1 && this.state.data[0].length > 0 ?
|
|
299
|
+
//Check if any Video Groups available
|
|
243
300
|
React__default.createElement(
|
|
244
301
|
Container,
|
|
245
302
|
null,
|
|
@@ -261,24 +318,43 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
261
318
|
'div',
|
|
262
319
|
null,
|
|
263
320
|
_this2.renderSeries(series)
|
|
321
|
+
),
|
|
322
|
+
_this2.state.scrolling ? React__default.createElement(
|
|
323
|
+
'button',
|
|
324
|
+
{
|
|
325
|
+
className: 'btn',
|
|
326
|
+
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' },
|
|
327
|
+
onClick: function onClick(e) {
|
|
328
|
+
e.target.style.display = 'none';
|
|
329
|
+
_this2.loadMore();
|
|
330
|
+
} },
|
|
331
|
+
'Load More'
|
|
332
|
+
) : React__default.createElement(
|
|
333
|
+
'p',
|
|
334
|
+
{ style: { textAlign: 'center' } },
|
|
335
|
+
React__default.createElement(
|
|
336
|
+
'b',
|
|
337
|
+
null,
|
|
338
|
+
'End of data'
|
|
339
|
+
)
|
|
264
340
|
)
|
|
265
341
|
);
|
|
266
342
|
})
|
|
267
|
-
)
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
{ style: { marginTop: '10px' } },
|
|
271
|
-
React__default.createElement(
|
|
272
|
-
'h5',
|
|
273
|
-
null,
|
|
343
|
+
) : React__default.createElement(
|
|
344
|
+
'div',
|
|
345
|
+
{ style: { marginTop: '10px' } },
|
|
274
346
|
React__default.createElement(
|
|
275
|
-
'
|
|
347
|
+
'h5',
|
|
276
348
|
null,
|
|
277
|
-
|
|
349
|
+
React__default.createElement(
|
|
350
|
+
'em',
|
|
351
|
+
null,
|
|
352
|
+
'New content coming soon, please check back later.'
|
|
353
|
+
)
|
|
278
354
|
)
|
|
279
355
|
)
|
|
280
|
-
)
|
|
281
|
-
|
|
356
|
+
);
|
|
357
|
+
}
|
|
282
358
|
}
|
|
283
359
|
}]);
|
|
284
360
|
|
package/dist/cjs/View.js
CHANGED
|
@@ -1282,7 +1282,9 @@ var View = function View(props) {
|
|
|
1282
1282
|
_props$showRelatedArt = props.showRelatedArticles,
|
|
1283
1283
|
showRelatedArticles = _props$showRelatedArt === undefined ? false : _props$showRelatedArt,
|
|
1284
1284
|
_props$canonicalTag = props.canonicalTag,
|
|
1285
|
-
canonicalTag = _props$canonicalTag === undefined ? true : _props$canonicalTag
|
|
1285
|
+
canonicalTag = _props$canonicalTag === undefined ? true : _props$canonicalTag,
|
|
1286
|
+
_props$infiniteScroll = props.infiniteScrollFlag,
|
|
1287
|
+
infiniteScrollFlag = _props$infiniteScroll === undefined ? true : _props$infiniteScroll;
|
|
1286
1288
|
var _props$article = props.article,
|
|
1287
1289
|
_props$article$passwo = _props$article.passwordLock,
|
|
1288
1290
|
passwordLock = _props$article$passwo === undefined ? false : _props$article$passwo,
|
|
@@ -1340,7 +1342,7 @@ var View = function View(props) {
|
|
|
1340
1342
|
|
|
1341
1343
|
var isVideoSeries = checkVideoSeries(props.article);
|
|
1342
1344
|
var isArticleSeries = checkArticleSeries(props.article);
|
|
1343
|
-
var needInfiniteScroll = ['Articles', 'Videos', 'Podcasts'].includes(article.category.name) && article.taxonomyMapping && article.passwordLock !== true && !isVideoSeries && !isArticleSeries && !article.ExcludeFromInfiniteScroll && !sponsoredFlag;
|
|
1345
|
+
var needInfiniteScroll = ['Articles', 'Videos', 'Podcasts'].includes(article.category.name) && article.taxonomyMapping && article.passwordLock !== true && !isVideoSeries && !isArticleSeries && !article.ExcludeFromInfiniteScroll && !sponsoredFlag && infiniteScrollFlag;
|
|
1344
1346
|
|
|
1345
1347
|
if (['Articles', 'Videos', 'Podcasts'].includes(article.category.name)) {
|
|
1346
1348
|
description = null;
|
package/dist/esm/MasterDeck.js
CHANGED
|
@@ -475,7 +475,8 @@ var MasterDeck = function (_React$Component) {
|
|
|
475
475
|
this.state.scrolling ? React__default.createElement(
|
|
476
476
|
'button',
|
|
477
477
|
{
|
|
478
|
-
|
|
478
|
+
className: 'btn',
|
|
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' },
|
|
479
480
|
onClick: function onClick(e) {
|
|
480
481
|
_this3.loadMore();
|
|
481
482
|
} },
|
|
@@ -223,17 +223,74 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
_createClass(VideoSeriesListing, [{
|
|
226
|
+
key: 'componentDidMount',
|
|
227
|
+
value: function componentDidMount() {
|
|
228
|
+
console.log(this.state);
|
|
229
|
+
}
|
|
230
|
+
}, {
|
|
226
231
|
key: 'render',
|
|
227
232
|
value: function render() {
|
|
228
233
|
var _this2 = this;
|
|
229
234
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
var _props$autoScroll = this.props.autoScroll,
|
|
236
|
+
autoScroll = _props$autoScroll === undefined ? true : _props$autoScroll;
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
if (autoScroll) {
|
|
240
|
+
return React__default.createElement(
|
|
241
|
+
React__default.Fragment,
|
|
242
|
+
null,
|
|
243
|
+
this.state.data.length >= 1 && this.state.data[0].length > 0 ?
|
|
244
|
+
//Check if any Video Groups available
|
|
245
|
+
React__default.createElement(
|
|
246
|
+
InfiniteScroll,
|
|
247
|
+
{ dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling, scrollThreshold: 0.8 },
|
|
248
|
+
React__default.createElement(
|
|
249
|
+
Container,
|
|
250
|
+
null,
|
|
251
|
+
this.state.data && this.state.data.map(function (series, index) {
|
|
252
|
+
var page = series && series.length > 0 && series[0].pageNumber !== 1 ? series[0].pageNumber : 1;
|
|
253
|
+
|
|
254
|
+
return React__default.createElement(
|
|
255
|
+
React__default.Fragment,
|
|
256
|
+
{ key: index },
|
|
257
|
+
React__default.createElement(
|
|
258
|
+
VisibilitySensor,
|
|
259
|
+
{
|
|
260
|
+
onChange: function onChange(isVisible) {
|
|
261
|
+
isVisible && _this2.changePageNumber(page);
|
|
262
|
+
} },
|
|
263
|
+
React__default.createElement('div', { className: 'visibility-sensor', style: { minHeight: '.25rem' } })
|
|
264
|
+
),
|
|
265
|
+
React__default.createElement(
|
|
266
|
+
'div',
|
|
267
|
+
null,
|
|
268
|
+
_this2.renderSeries(series)
|
|
269
|
+
)
|
|
270
|
+
);
|
|
271
|
+
})
|
|
272
|
+
)
|
|
273
|
+
) : React__default.createElement(
|
|
274
|
+
'div',
|
|
275
|
+
{ style: { marginTop: '10px' } },
|
|
276
|
+
React__default.createElement(
|
|
277
|
+
'h5',
|
|
278
|
+
null,
|
|
279
|
+
React__default.createElement(
|
|
280
|
+
'em',
|
|
281
|
+
null,
|
|
282
|
+
'New content coming soon, please check back later.'
|
|
283
|
+
)
|
|
284
|
+
)
|
|
285
|
+
)
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
if (!autoScroll) {
|
|
289
|
+
return React__default.createElement(
|
|
290
|
+
React__default.Fragment,
|
|
291
|
+
null,
|
|
292
|
+
this.state.data.length >= 1 && this.state.data[0].length > 0 ?
|
|
293
|
+
//Check if any Video Groups available
|
|
237
294
|
React__default.createElement(
|
|
238
295
|
Container,
|
|
239
296
|
null,
|
|
@@ -255,24 +312,43 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
255
312
|
'div',
|
|
256
313
|
null,
|
|
257
314
|
_this2.renderSeries(series)
|
|
315
|
+
),
|
|
316
|
+
_this2.state.scrolling ? React__default.createElement(
|
|
317
|
+
'button',
|
|
318
|
+
{
|
|
319
|
+
className: 'btn',
|
|
320
|
+
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' },
|
|
321
|
+
onClick: function onClick(e) {
|
|
322
|
+
e.target.style.display = 'none';
|
|
323
|
+
_this2.loadMore();
|
|
324
|
+
} },
|
|
325
|
+
'Load More'
|
|
326
|
+
) : React__default.createElement(
|
|
327
|
+
'p',
|
|
328
|
+
{ style: { textAlign: 'center' } },
|
|
329
|
+
React__default.createElement(
|
|
330
|
+
'b',
|
|
331
|
+
null,
|
|
332
|
+
'End of data'
|
|
333
|
+
)
|
|
258
334
|
)
|
|
259
335
|
);
|
|
260
336
|
})
|
|
261
|
-
)
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
{ style: { marginTop: '10px' } },
|
|
265
|
-
React__default.createElement(
|
|
266
|
-
'h5',
|
|
267
|
-
null,
|
|
337
|
+
) : React__default.createElement(
|
|
338
|
+
'div',
|
|
339
|
+
{ style: { marginTop: '10px' } },
|
|
268
340
|
React__default.createElement(
|
|
269
|
-
'
|
|
341
|
+
'h5',
|
|
270
342
|
null,
|
|
271
|
-
|
|
343
|
+
React__default.createElement(
|
|
344
|
+
'em',
|
|
345
|
+
null,
|
|
346
|
+
'New content coming soon, please check back later.'
|
|
347
|
+
)
|
|
272
348
|
)
|
|
273
349
|
)
|
|
274
|
-
)
|
|
275
|
-
|
|
350
|
+
);
|
|
351
|
+
}
|
|
276
352
|
}
|
|
277
353
|
}]);
|
|
278
354
|
|
package/dist/esm/View.js
CHANGED
|
@@ -1276,7 +1276,9 @@ var View = function View(props) {
|
|
|
1276
1276
|
_props$showRelatedArt = props.showRelatedArticles,
|
|
1277
1277
|
showRelatedArticles = _props$showRelatedArt === undefined ? false : _props$showRelatedArt,
|
|
1278
1278
|
_props$canonicalTag = props.canonicalTag,
|
|
1279
|
-
canonicalTag = _props$canonicalTag === undefined ? true : _props$canonicalTag
|
|
1279
|
+
canonicalTag = _props$canonicalTag === undefined ? true : _props$canonicalTag,
|
|
1280
|
+
_props$infiniteScroll = props.infiniteScrollFlag,
|
|
1281
|
+
infiniteScrollFlag = _props$infiniteScroll === undefined ? true : _props$infiniteScroll;
|
|
1280
1282
|
var _props$article = props.article,
|
|
1281
1283
|
_props$article$passwo = _props$article.passwordLock,
|
|
1282
1284
|
passwordLock = _props$article$passwo === undefined ? false : _props$article$passwo,
|
|
@@ -1334,7 +1336,7 @@ var View = function View(props) {
|
|
|
1334
1336
|
|
|
1335
1337
|
var isVideoSeries = checkVideoSeries(props.article);
|
|
1336
1338
|
var isArticleSeries = checkArticleSeries(props.article);
|
|
1337
|
-
var needInfiniteScroll = ['Articles', 'Videos', 'Podcasts'].includes(article.category.name) && article.taxonomyMapping && article.passwordLock !== true && !isVideoSeries && !isArticleSeries && !article.ExcludeFromInfiniteScroll && !sponsoredFlag;
|
|
1339
|
+
var needInfiniteScroll = ['Articles', 'Videos', 'Podcasts'].includes(article.category.name) && article.taxonomyMapping && article.passwordLock !== true && !isVideoSeries && !isArticleSeries && !article.ExcludeFromInfiniteScroll && !sponsoredFlag && infiniteScrollFlag;
|
|
1338
1340
|
|
|
1339
1341
|
if (['Articles', 'Videos', 'Podcasts'].includes(article.category.name)) {
|
|
1340
1342
|
description = null;
|