@mjhls/mjh-framework 1.0.225 → 1.0.227
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/{AdSlot-d87cef08.js → AdSlot-1c1700a3.js} +1 -1
- package/dist/cjs/DeckContent.js +2 -2
- package/dist/cjs/DeckQueue.js +1 -1
- package/dist/cjs/{Dfp-c4f1f12a.js → Dfp-b6d403f8.js} +1 -1
- package/dist/cjs/{GridContent-1575c8db.js → GridContent-e45cb4c7.js} +35 -9
- package/dist/cjs/GridContent.js +3 -3
- package/dist/cjs/MasterDeck.js +1 -1
- package/dist/cjs/{Normal-11ae4373.js → Normal-c3488266.js} +32 -3
- package/dist/cjs/QueueDeckExpanded.js +19 -5
- package/dist/cjs/{TaxonomyCard-d97685e2.js → TaxonomyCard-0d4ec68b.js} +1 -1
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +3 -3
- package/dist/cjs/{Ustream-0d3dd953.js → Ustream-5f595d09.js} +1 -1
- package/dist/cjs/Ustream.js +2 -2
- package/dist/cjs/VideoSeriesListing.js +1 -1
- package/dist/cjs/{_babelHelpers-f321c258.js → _babelHelpers-4a69caad.js} +30 -0
- package/dist/cjs/index.js +81 -68
- package/dist/esm/{AdSlot-b67f8534.js → AdSlot-748bc6ff.js} +1 -1
- package/dist/esm/DeckContent.js +2 -2
- package/dist/esm/DeckQueue.js +1 -1
- package/dist/esm/{Dfp-6731ac01.js → Dfp-ad9b4fbe.js} +1 -1
- package/dist/esm/{GridContent-e5cdc9da.js → GridContent-036fbe57.js} +35 -9
- package/dist/esm/GridContent.js +3 -3
- package/dist/esm/MasterDeck.js +1 -1
- package/dist/esm/{Normal-8e0aa5e8.js → Normal-088cf5cf.js} +32 -3
- package/dist/esm/QueueDeckExpanded.js +19 -5
- package/dist/esm/{TaxonomyCard-f9c93953.js → TaxonomyCard-92f9e327.js} +1 -1
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +3 -3
- package/dist/esm/{Ustream-6bb45fe7.js → Ustream-2bfb1813.js} +1 -1
- package/dist/esm/Ustream.js +2 -2
- package/dist/esm/VideoSeriesListing.js +1 -1
- package/dist/esm/{_babelHelpers-67c05996.js → _babelHelpers-c212c59c.js} +30 -1
- package/dist/esm/index.js +85 -72
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -23,15 +23,15 @@ var index$1 = require('./index-a4c53ff4.js');
|
|
|
23
23
|
require('./index-0d0efcfa.js');
|
|
24
24
|
var main = require('./main-58839f4e.js');
|
|
25
25
|
var entities = require('./entities-3e0b4a16.js');
|
|
26
|
-
var _babelHelpers = require('./_babelHelpers-
|
|
27
|
-
var AdSlot = require('./AdSlot-
|
|
26
|
+
var _babelHelpers = require('./_babelHelpers-4a69caad.js');
|
|
27
|
+
var AdSlot = require('./AdSlot-1c1700a3.js');
|
|
28
28
|
var DeckContent = require('./DeckContent.js');
|
|
29
29
|
require('./get-126b1712.js');
|
|
30
|
-
var GridContent = require('./GridContent-
|
|
30
|
+
var GridContent = require('./GridContent-e45cb4c7.js');
|
|
31
31
|
var DeckQueue = require('./DeckQueue.js');
|
|
32
32
|
require('react-bootstrap/Media');
|
|
33
33
|
var ThumbnailCard = require('./ThumbnailCard.js');
|
|
34
|
-
var TaxonomyCard = require('./TaxonomyCard-
|
|
34
|
+
var TaxonomyCard = require('./TaxonomyCard-0d4ec68b.js');
|
|
35
35
|
var GroupDeck = require('./GroupDeck.js');
|
|
36
36
|
var YoutubeGroup = require('./YoutubeGroup-ad994d02.js');
|
|
37
37
|
var reactBootstrap = require('react-bootstrap');
|
|
@@ -44,7 +44,7 @@ var PublicationDeck = require('./PublicationDeck.js');
|
|
|
44
44
|
var IssueDeck = require('./IssueDeck.js');
|
|
45
45
|
require('react-bootstrap/Badge');
|
|
46
46
|
var IssueContentDeck = require('./IssueContentDeck.js');
|
|
47
|
-
var TemplateNormal = require('./Normal-
|
|
47
|
+
var TemplateNormal = require('./Normal-c3488266.js');
|
|
48
48
|
require('react-bootstrap/ListGroup');
|
|
49
49
|
var Head = _interopDefault(require('next/head'));
|
|
50
50
|
var Accordion = _interopDefault(require('react-bootstrap/Accordion'));
|
|
@@ -60,7 +60,7 @@ var Carousel = _interopDefault(require('react-bootstrap/Carousel'));
|
|
|
60
60
|
var Breadcrumb = _interopDefault(require('react-bootstrap/Breadcrumb'));
|
|
61
61
|
var DropdownButton = _interopDefault(require('react-bootstrap/DropdownButton'));
|
|
62
62
|
var Dropdown = _interopDefault(require('react-bootstrap/Dropdown'));
|
|
63
|
-
var Ustream = require('./Ustream-
|
|
63
|
+
var Ustream = require('./Ustream-5f595d09.js');
|
|
64
64
|
|
|
65
65
|
var AccordionPanel = function AccordionPanel(props) {
|
|
66
66
|
var accordionClassName = props.accordionClassName,
|
|
@@ -12366,8 +12366,9 @@ var ArticleQueue = function (_React$Component) {
|
|
|
12366
12366
|
title: _this.props.article.title,
|
|
12367
12367
|
summary: metaDescription,
|
|
12368
12368
|
queueData: [article],
|
|
12369
|
-
|
|
12370
|
-
|
|
12369
|
+
keywords: [],
|
|
12370
|
+
maxListLength: 10,
|
|
12371
|
+
loading: false
|
|
12371
12372
|
}, _this.preVscroll = 0;
|
|
12372
12373
|
_this.isScrollDown = true;
|
|
12373
12374
|
|
|
@@ -12379,25 +12380,6 @@ var ArticleQueue = function (_React$Component) {
|
|
|
12379
12380
|
value: function componentDidMount() {
|
|
12380
12381
|
window.addEventListener('scroll', this.scrollDirectionDetect);
|
|
12381
12382
|
}
|
|
12382
|
-
}, {
|
|
12383
|
-
key: 'componentDidUpdate',
|
|
12384
|
-
value: function componentDidUpdate(prevProps) {
|
|
12385
|
-
var _this2 = this;
|
|
12386
|
-
|
|
12387
|
-
if (prevProps.relatedArticles != this.props.relatedArticles) {
|
|
12388
|
-
var relatedArticles = this.props.relatedArticles.map(function (article) {
|
|
12389
|
-
var targeting = _this2.getTargeting(_this2.props.article);
|
|
12390
|
-
var Ads = _this2.props.Ads.getRightItems(targeting);
|
|
12391
|
-
return _babelHelpers._extends({}, article, { Ads: Ads });
|
|
12392
|
-
});
|
|
12393
|
-
var queueData = [].concat(_babelHelpers.toConsumableArray(this.state.queueData));
|
|
12394
|
-
if (prevProps.relatedArticles.length == 0) {
|
|
12395
|
-
queueData.push(relatedArticles.shift());
|
|
12396
|
-
this.setState({ queueData: queueData });
|
|
12397
|
-
}
|
|
12398
|
-
this.setState({ relatedArticles: relatedArticles });
|
|
12399
|
-
}
|
|
12400
|
-
}
|
|
12401
12383
|
}, {
|
|
12402
12384
|
key: 'componentWillUnmount',
|
|
12403
12385
|
value: function componentWillUnmount() {
|
|
@@ -12408,7 +12390,7 @@ var ArticleQueue = function (_React$Component) {
|
|
|
12408
12390
|
}, {
|
|
12409
12391
|
key: 'render',
|
|
12410
12392
|
value: function render() {
|
|
12411
|
-
var
|
|
12393
|
+
var _this2 = this;
|
|
12412
12394
|
|
|
12413
12395
|
var _state = this.state,
|
|
12414
12396
|
config = _state.config,
|
|
@@ -12431,12 +12413,12 @@ var ArticleQueue = function (_React$Component) {
|
|
|
12431
12413
|
queueData.map(function (article, index) {
|
|
12432
12414
|
return React__default.createElement(Article, _babelHelpers._extends({
|
|
12433
12415
|
key: index,
|
|
12434
|
-
urlFor:
|
|
12435
|
-
isCutomPage:
|
|
12436
|
-
renderIsiContent:
|
|
12437
|
-
},
|
|
12416
|
+
urlFor: _this2.urlFor,
|
|
12417
|
+
isCutomPage: _this2.isCutomPage,
|
|
12418
|
+
renderIsiContent: _this2.renderIsiContent
|
|
12419
|
+
}, _this2.props, {
|
|
12438
12420
|
shareOptions: shareOptions,
|
|
12439
|
-
changeUrl:
|
|
12421
|
+
changeUrl: _this2.changeUrl,
|
|
12440
12422
|
article: article
|
|
12441
12423
|
}));
|
|
12442
12424
|
})
|
|
@@ -12448,37 +12430,68 @@ var ArticleQueue = function (_React$Component) {
|
|
|
12448
12430
|
}(React__default.Component);
|
|
12449
12431
|
|
|
12450
12432
|
var _initialiseProps = function _initialiseProps() {
|
|
12451
|
-
var
|
|
12433
|
+
var _this3 = this;
|
|
12452
12434
|
|
|
12453
12435
|
this.scrollDirectionDetect = function (e) {
|
|
12454
12436
|
var window = e.currentTarget;
|
|
12455
|
-
var isScrollDown =
|
|
12437
|
+
var isScrollDown = _this3.isScrollDown;
|
|
12456
12438
|
|
|
12457
12439
|
|
|
12458
|
-
if (
|
|
12440
|
+
if (_this3.preVscroll > window.scrollY) {
|
|
12459
12441
|
if (!isScrollDown) {
|
|
12460
|
-
|
|
12442
|
+
_this3.isScrollDown = true;
|
|
12461
12443
|
}
|
|
12462
|
-
} else if (
|
|
12444
|
+
} else if (_this3.preVscroll < window.scrollY) {
|
|
12463
12445
|
if (isScrollDown) {
|
|
12464
|
-
|
|
12446
|
+
_this3.isScrollDown = false;
|
|
12465
12447
|
}
|
|
12466
12448
|
}
|
|
12467
|
-
|
|
12449
|
+
_this3.preVscroll = window.scrollY;
|
|
12468
12450
|
};
|
|
12469
12451
|
|
|
12470
|
-
this.loadmore = function () {
|
|
12471
|
-
var queueData
|
|
12472
|
-
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
|
|
12477
|
-
|
|
12452
|
+
this.loadmore = _babelHelpers.asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
12453
|
+
var maxListLength, queueData, query, params, article, targeting;
|
|
12454
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
12455
|
+
while (1) {
|
|
12456
|
+
switch (_context.prev = _context.next) {
|
|
12457
|
+
case 0:
|
|
12458
|
+
maxListLength = _this3.props.maxListLength ? _this3.props.maxListLength : _this3.state.maxListLength;
|
|
12459
|
+
queueData = [].concat(_babelHelpers.toConsumableArray(_this3.state.queueData));
|
|
12460
|
+
query = _this3.props.relatedArticleQuery;
|
|
12461
|
+
params = _this3.props.params;
|
|
12462
|
+
|
|
12463
|
+
if (!(queueData.length < maxListLength)) {
|
|
12464
|
+
_context.next = 10;
|
|
12465
|
+
break;
|
|
12466
|
+
}
|
|
12467
|
+
|
|
12468
|
+
params.index = queueData.length - 1;
|
|
12469
|
+
|
|
12470
|
+
_context.next = 8;
|
|
12471
|
+
return _this3.props.client.fetch(query, params);
|
|
12472
|
+
|
|
12473
|
+
case 8:
|
|
12474
|
+
article = _context.sent;
|
|
12475
|
+
|
|
12476
|
+
if (article) {
|
|
12477
|
+
targeting = _this3.getTargeting(article);
|
|
12478
|
+
|
|
12479
|
+
article.Ads = _this3.props.Ads.getRightItems(targeting);
|
|
12480
|
+
queueData.push(article);
|
|
12481
|
+
_this3.setState({ queueData: queueData });
|
|
12482
|
+
}
|
|
12483
|
+
|
|
12484
|
+
case 10:
|
|
12485
|
+
case 'end':
|
|
12486
|
+
return _context.stop();
|
|
12487
|
+
}
|
|
12488
|
+
}
|
|
12489
|
+
}, _callee, _this3);
|
|
12490
|
+
}));
|
|
12478
12491
|
|
|
12479
12492
|
this.isCutomPage = function (article) {
|
|
12480
12493
|
var url = article.url.current;
|
|
12481
|
-
var _props2 =
|
|
12494
|
+
var _props2 = _this3.props,
|
|
12482
12495
|
regionalPages = _props2.regionalPages,
|
|
12483
12496
|
nationalPage = _props2.nationalPage;
|
|
12484
12497
|
|
|
@@ -12486,7 +12499,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
12486
12499
|
};
|
|
12487
12500
|
|
|
12488
12501
|
this.urlFor = function (source) {
|
|
12489
|
-
return index$1.imageUrlBuilder(
|
|
12502
|
+
return index$1.imageUrlBuilder(_this3.props.client).image(source);
|
|
12490
12503
|
};
|
|
12491
12504
|
|
|
12492
12505
|
this.getTargeting = function (article) {
|
|
@@ -12511,7 +12524,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
12511
12524
|
content_placement = article.content_placement;
|
|
12512
12525
|
|
|
12513
12526
|
var context = url;
|
|
12514
|
-
var localHistory =
|
|
12527
|
+
var localHistory = _this3.props.historyCookie ? JSON.parse(_this3.props.historyCookie) : [];
|
|
12515
12528
|
if (!context && localHistory) {
|
|
12516
12529
|
context = localHistory[localHistory.length - 1];
|
|
12517
12530
|
}
|
|
@@ -12550,7 +12563,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
12550
12563
|
var _article$taxonomyMapp = article.taxonomyMapping,
|
|
12551
12564
|
taxonomyMapping = _article$taxonomyMapp === undefined ? [] : _article$taxonomyMapp;
|
|
12552
12565
|
|
|
12553
|
-
if (
|
|
12566
|
+
if (_this3.props.checkSponsered) {
|
|
12554
12567
|
|
|
12555
12568
|
return taxonomyMapping.some(function (item) {
|
|
12556
12569
|
return item._ref === 'ict_taxonomy_735_sponsoredresources';
|
|
@@ -12562,7 +12575,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
12562
12575
|
|
|
12563
12576
|
this.renderIsiContent = function (article) {
|
|
12564
12577
|
var url = article.url.current;
|
|
12565
|
-
var _props3 =
|
|
12578
|
+
var _props3 = _this3.props,
|
|
12566
12579
|
ISIContent = _props3.iSIContent,
|
|
12567
12580
|
regionalPages = _props3.regionalPages,
|
|
12568
12581
|
nationalPage = _props3.nationalPage;
|
|
@@ -12596,7 +12609,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
12596
12609
|
};
|
|
12597
12610
|
|
|
12598
12611
|
this.refreshAdd = function (path) {
|
|
12599
|
-
var article =
|
|
12612
|
+
var article = _this3.state.queueData.find(function (item) {
|
|
12600
12613
|
return item.url.current == path;
|
|
12601
12614
|
});
|
|
12602
12615
|
var title = article.title,
|
|
@@ -12616,20 +12629,20 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
12616
12629
|
var description = _article$seo.meta_description;
|
|
12617
12630
|
|
|
12618
12631
|
var keywords = [].concat(_babelHelpers.toConsumableArray(internalTag), _babelHelpers.toConsumableArray(userDefinedTag), _babelHelpers.toConsumableArray(SponsorshipTag), _babelHelpers.toConsumableArray(seoTag));
|
|
12619
|
-
var config = _babelHelpers._extends({},
|
|
12620
|
-
var targeting =
|
|
12632
|
+
var config = _babelHelpers._extends({}, _this3.state.config);
|
|
12633
|
+
var targeting = _this3.getTargeting(article);
|
|
12621
12634
|
var rightItems = [];
|
|
12622
12635
|
|
|
12623
|
-
if (
|
|
12636
|
+
if (_this3.checkSponseredArticle(article)) {
|
|
12624
12637
|
rightItems = [];
|
|
12625
12638
|
} else {
|
|
12626
|
-
rightItems =
|
|
12639
|
+
rightItems = _this3.props.Ads.getRightItems(targeting);
|
|
12627
12640
|
}
|
|
12628
|
-
var horizontalAD =
|
|
12641
|
+
var horizontalAD = _this3.props.Ads.getHorizontal(targeting);
|
|
12629
12642
|
config.rightItems = rightItems;
|
|
12630
12643
|
config.horizontalAD = horizontalAD;
|
|
12631
|
-
var metaDescription = description ? description : summary ? summary :
|
|
12632
|
-
|
|
12644
|
+
var metaDescription = description ? description : summary ? summary : _this3.getFirstLine(article);
|
|
12645
|
+
_this3.setState({ config: config, title: title, summary: metaDescription }, function () {
|
|
12633
12646
|
if (!main.main_36) {
|
|
12634
12647
|
index.lib_3.refresh();
|
|
12635
12648
|
}
|
|
@@ -12637,28 +12650,28 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
12637
12650
|
};
|
|
12638
12651
|
|
|
12639
12652
|
this.changeUrl = function (path, visibility) {
|
|
12640
|
-
var isScrollDown =
|
|
12653
|
+
var isScrollDown = _this3.isScrollDown;
|
|
12641
12654
|
|
|
12642
12655
|
var newPath = '/view/' + path;
|
|
12643
12656
|
if (!isScrollDown) {
|
|
12644
12657
|
if (visibility == 'top') {
|
|
12645
12658
|
// Router.push('/view/[url]', newPath, {shallow:true})
|
|
12646
12659
|
window.history.pushState({ page: path }, path, newPath);
|
|
12647
|
-
if (
|
|
12648
|
-
|
|
12660
|
+
if (_this3.props.pageview) {
|
|
12661
|
+
_this3.props.pageview(newPath);
|
|
12649
12662
|
}
|
|
12650
12663
|
|
|
12651
|
-
|
|
12664
|
+
_this3.refreshAdd(path);
|
|
12652
12665
|
}
|
|
12653
12666
|
} else {
|
|
12654
12667
|
if (visibility == 'bottom') {
|
|
12655
12668
|
// Router.push('/view/[url]', newPath, {shallow:true})
|
|
12656
12669
|
window.history.pushState({ page: path }, path, newPath);
|
|
12657
|
-
if (
|
|
12658
|
-
|
|
12670
|
+
if (_this3.props.pageview) {
|
|
12671
|
+
_this3.props.pageview(newPath);
|
|
12659
12672
|
}
|
|
12660
12673
|
|
|
12661
|
-
|
|
12674
|
+
_this3.refreshAdd(path);
|
|
12662
12675
|
}
|
|
12663
12676
|
}
|
|
12664
12677
|
};
|
|
@@ -2,7 +2,7 @@ import React__default, { useState } from 'react';
|
|
|
2
2
|
import { b as lib_2 } from './index-6a79dad6.js';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { d as debounce_1 } from './debounce-dc0c02e5.js';
|
|
5
|
-
import { s as slicedToArray } from './_babelHelpers-
|
|
5
|
+
import { s as slicedToArray } from './_babelHelpers-c212c59c.js';
|
|
6
6
|
|
|
7
7
|
var DFPAdSlot = function DFPAdSlot(_ref) {
|
|
8
8
|
var adUnit = _ref.adUnit,
|
package/dist/esm/DeckContent.js
CHANGED
|
@@ -15,8 +15,8 @@ import { i as imageUrlBuilder } from './index-ca4ff5cb.js';
|
|
|
15
15
|
import { L as LazyLoad } from './index-3c1ee9ab.js';
|
|
16
16
|
import { a as main_36 } from './main-dea495b7.js';
|
|
17
17
|
import { c as clean_html_1 } from './entities-e85d3a4a.js';
|
|
18
|
-
import { i as inherits, c as createClass, a as classCallCheck, p as possibleConstructorReturn, _ as _extends, t as toConsumableArray } from './_babelHelpers-
|
|
19
|
-
import { D as DFPAdSlot } from './AdSlot-
|
|
18
|
+
import { i as inherits, c as createClass, a as classCallCheck, p as possibleConstructorReturn, _ as _extends, t as toConsumableArray } from './_babelHelpers-c212c59c.js';
|
|
19
|
+
import { D as DFPAdSlot } from './AdSlot-748bc6ff.js';
|
|
20
20
|
|
|
21
21
|
var DeckContent = function (_React$Component) {
|
|
22
22
|
inherits(DeckContent, _React$Component);
|
package/dist/esm/DeckQueue.js
CHANGED
|
@@ -15,7 +15,7 @@ import { i as imageUrlBuilder } from './index-ca4ff5cb.js';
|
|
|
15
15
|
import { L as LazyLoad } from './index-3c1ee9ab.js';
|
|
16
16
|
import { a as main_36 } from './main-dea495b7.js';
|
|
17
17
|
import { c as clean_html_1 } from './entities-e85d3a4a.js';
|
|
18
|
-
import { i as inherits, c as createClass, a as classCallCheck, p as possibleConstructorReturn, _ as _extends, t as toConsumableArray } from './_babelHelpers-
|
|
18
|
+
import { i as inherits, c as createClass, a as classCallCheck, p as possibleConstructorReturn, _ as _extends, t as toConsumableArray } from './_babelHelpers-c212c59c.js';
|
|
19
19
|
import { g as get_1 } from './get-b074314b.js';
|
|
20
20
|
|
|
21
21
|
var DeckQueue = function (_React$Component) {
|
|
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import { V as VisibilitySensor } from './visibility-sensor-675d3fa1.js';
|
|
6
6
|
import { d as debounce_1 } from './debounce-dc0c02e5.js';
|
|
7
7
|
import 'react-dom';
|
|
8
|
-
import { s as slicedToArray } from './_babelHelpers-
|
|
8
|
+
import { s as slicedToArray } from './_babelHelpers-c212c59c.js';
|
|
9
9
|
|
|
10
10
|
var AD = function AD(_ref) {
|
|
11
11
|
var networkID = _ref.networkID,
|
|
@@ -12,12 +12,12 @@ import { i as imageUrlBuilder } from './index-ca4ff5cb.js';
|
|
|
12
12
|
import { L as LazyLoad } from './index-3c1ee9ab.js';
|
|
13
13
|
import { a as main_36 } from './main-dea495b7.js';
|
|
14
14
|
import { c as clean_html_1 } from './entities-e85d3a4a.js';
|
|
15
|
-
import { i as inherits, c as createClass, t as toConsumableArray, a as classCallCheck, p as possibleConstructorReturn, _ as _extends } from './_babelHelpers-
|
|
16
|
-
import { D as DFPAdSlot } from './AdSlot-
|
|
15
|
+
import { i as inherits, c as createClass, t as toConsumableArray, a as classCallCheck, p as possibleConstructorReturn, _ as _extends } from './_babelHelpers-c212c59c.js';
|
|
16
|
+
import { D as DFPAdSlot } from './AdSlot-748bc6ff.js';
|
|
17
17
|
import { g as get_1 } from './get-b074314b.js';
|
|
18
18
|
|
|
19
19
|
var Dfp = React__default.lazy(function () {
|
|
20
|
-
return import('./Dfp-
|
|
20
|
+
return import('./Dfp-ad9b4fbe.js');
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
var AD = function AD(props) {
|
|
@@ -268,7 +268,7 @@ var GridContent = function (_React$Component) {
|
|
|
268
268
|
return React__default.createElement(
|
|
269
269
|
Row,
|
|
270
270
|
null,
|
|
271
|
-
this.state.data && this.state.data.map(function (row, index) {
|
|
271
|
+
this.state.data && this.state.data.length > 0 ? this.state.data.map(function (row, index) {
|
|
272
272
|
// const thumbnailURL = get(row, 'thumbnail.asset.url', this.props.defaultImage)
|
|
273
273
|
return React__default.createElement(
|
|
274
274
|
Col,
|
|
@@ -325,7 +325,19 @@ var GridContent = function (_React$Component) {
|
|
|
325
325
|
)
|
|
326
326
|
)
|
|
327
327
|
);
|
|
328
|
-
})
|
|
328
|
+
}) : React__default.createElement(
|
|
329
|
+
'div',
|
|
330
|
+
null,
|
|
331
|
+
React__default.createElement(
|
|
332
|
+
'h5',
|
|
333
|
+
null,
|
|
334
|
+
React__default.createElement(
|
|
335
|
+
'em',
|
|
336
|
+
null,
|
|
337
|
+
'New content coming soon, please check back later.'
|
|
338
|
+
)
|
|
339
|
+
)
|
|
340
|
+
)
|
|
329
341
|
);
|
|
330
342
|
}
|
|
331
343
|
|
|
@@ -362,7 +374,7 @@ var GridContent = function (_React$Component) {
|
|
|
362
374
|
return React__default.createElement(
|
|
363
375
|
'div',
|
|
364
376
|
{ className: 'grid-container' },
|
|
365
|
-
posts && posts.map(function (row, index) {
|
|
377
|
+
posts && posts.length > 0 ? posts.map(function (row, index) {
|
|
366
378
|
var pageNumber = row.pageNumber || _this2.state.page;
|
|
367
379
|
var contentCategoryName = row.contentCategory && row.contentCategory.name && _this2.mapping[row.contentCategory.name] ? row.contentCategory.name : 'Articles';
|
|
368
380
|
var linkHref = row.url && row.url.current ? _this2.mapping[contentCategoryName] + '/' + row.url.current : '';
|
|
@@ -374,8 +386,9 @@ var GridContent = function (_React$Component) {
|
|
|
374
386
|
React__default.createElement(
|
|
375
387
|
VisibilitySensor,
|
|
376
388
|
{
|
|
389
|
+
partialVisibility: true,
|
|
377
390
|
onChange: function onChange(isVisible) {
|
|
378
|
-
isVisible && _this2.changePageNumber(
|
|
391
|
+
isVisible && _this2.changePageNumber(1);
|
|
379
392
|
} },
|
|
380
393
|
React__default.createElement(
|
|
381
394
|
'div',
|
|
@@ -435,8 +448,9 @@ var GridContent = function (_React$Component) {
|
|
|
435
448
|
React__default.createElement(
|
|
436
449
|
VisibilitySensor,
|
|
437
450
|
{
|
|
451
|
+
partialVisibility: true,
|
|
438
452
|
onChange: function onChange(isVisible) {
|
|
439
|
-
isVisible && _this2.changePageNumber(
|
|
453
|
+
isVisible && _this2.changePageNumber(1);
|
|
440
454
|
} },
|
|
441
455
|
React__default.createElement(
|
|
442
456
|
'div',
|
|
@@ -565,7 +579,19 @@ var GridContent = function (_React$Component) {
|
|
|
565
579
|
showVideo && (posts.length < numberOfItemsBeforeVideo || index + 1 === numberOfItemsBeforeVideo) && React__default.createElement(VideoPlayer, null),
|
|
566
580
|
main_36 && _this2.props.rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && _this2.renderMobileAd(index, numberOfItemsBeforeAd)
|
|
567
581
|
);
|
|
568
|
-
})
|
|
582
|
+
}) : React__default.createElement(
|
|
583
|
+
'div',
|
|
584
|
+
null,
|
|
585
|
+
React__default.createElement(
|
|
586
|
+
'h5',
|
|
587
|
+
null,
|
|
588
|
+
React__default.createElement(
|
|
589
|
+
'em',
|
|
590
|
+
null,
|
|
591
|
+
'New content coming soon, please check back later.'
|
|
592
|
+
)
|
|
593
|
+
)
|
|
594
|
+
)
|
|
569
595
|
);
|
|
570
596
|
}
|
|
571
597
|
}, {
|
package/dist/esm/GridContent.js
CHANGED
|
@@ -15,7 +15,7 @@ import './index-ca4ff5cb.js';
|
|
|
15
15
|
import './index-3c1ee9ab.js';
|
|
16
16
|
import './main-dea495b7.js';
|
|
17
17
|
import './entities-e85d3a4a.js';
|
|
18
|
-
import './_babelHelpers-
|
|
19
|
-
import './AdSlot-
|
|
18
|
+
import './_babelHelpers-c212c59c.js';
|
|
19
|
+
import './AdSlot-748bc6ff.js';
|
|
20
20
|
import './get-b074314b.js';
|
|
21
|
-
export { G as default } from './GridContent-
|
|
21
|
+
export { G as default } from './GridContent-036fbe57.js';
|
package/dist/esm/MasterDeck.js
CHANGED
|
@@ -13,7 +13,7 @@ import { d as debounce_1 } from './debounce-dc0c02e5.js';
|
|
|
13
13
|
import 'react-dom';
|
|
14
14
|
import './index-ca4ff5cb.js';
|
|
15
15
|
import { a as main_36 } from './main-dea495b7.js';
|
|
16
|
-
import { i as inherits, c as createClass, a as classCallCheck, p as possibleConstructorReturn, _ as _extends, t as toConsumableArray } from './_babelHelpers-
|
|
16
|
+
import { i as inherits, c as createClass, a as classCallCheck, p as possibleConstructorReturn, _ as _extends, t as toConsumableArray } from './_babelHelpers-c212c59c.js';
|
|
17
17
|
|
|
18
18
|
var MasterDeck = function (_React$Component) {
|
|
19
19
|
inherits(MasterDeck, _React$Component);
|
|
@@ -6,8 +6,8 @@ import Row from 'react-bootstrap/Row';
|
|
|
6
6
|
import Col from 'react-bootstrap/Col';
|
|
7
7
|
import Link from 'next/link';
|
|
8
8
|
import { a as main_36, b as main_37 } from './main-dea495b7.js';
|
|
9
|
-
import { s as slicedToArray } from './_babelHelpers-
|
|
10
|
-
import { D as DFPAdSlot } from './AdSlot-
|
|
9
|
+
import { s as slicedToArray } from './_babelHelpers-c212c59c.js';
|
|
10
|
+
import { D as DFPAdSlot } from './AdSlot-748bc6ff.js';
|
|
11
11
|
import { g as get_1 } from './get-b074314b.js';
|
|
12
12
|
import { Dropdown } from 'react-bootstrap';
|
|
13
13
|
import { G as GenIcon, b as IoMdLogIn, c as IoIosHome } from './index.esm-536609db.js';
|
|
@@ -1289,6 +1289,32 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
1289
1289
|
setScreenWidth(parseInt(window.innerWidth));
|
|
1290
1290
|
}, []);
|
|
1291
1291
|
|
|
1292
|
+
useEffect(function () {
|
|
1293
|
+
var navOffsetTop = navRef.current.getBoundingClientRect().top;
|
|
1294
|
+
var navOffsetHeight = navRef.current.getBoundingClientRect().height;
|
|
1295
|
+
var adSection = document.querySelector('.AD728x90');
|
|
1296
|
+
var stickyNav = window.addEventListener('scroll', function () {
|
|
1297
|
+
if (window.pageYOffset > navOffsetTop) {
|
|
1298
|
+
if (navRef.current && navRef.current.style) {
|
|
1299
|
+
navRef.current.style.position = 'fixed';
|
|
1300
|
+
navRef.current.style.top = 0;
|
|
1301
|
+
navRef.current.style.width = '100%';
|
|
1302
|
+
navRef.current.style.zIndex = '9999';
|
|
1303
|
+
adSection.style.marginTop = navOffsetHeight + 'px';
|
|
1304
|
+
}
|
|
1305
|
+
} else {
|
|
1306
|
+
if (navRef.current && navRef.current.style) {
|
|
1307
|
+
navRef.current.style.position = 'relative';
|
|
1308
|
+
navRef.current.style.top = '';
|
|
1309
|
+
adSection.style.marginTop = '';
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
});
|
|
1313
|
+
return function () {
|
|
1314
|
+
window.removeEventListener('scroll', stickyNav);
|
|
1315
|
+
};
|
|
1316
|
+
}, []);
|
|
1317
|
+
|
|
1292
1318
|
var trackScrolling = function trackScrolling() {
|
|
1293
1319
|
var offsetTop = navRef.current.getBoundingClientRect().top;
|
|
1294
1320
|
|
|
@@ -1999,7 +2025,7 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
1999
2025
|
var navOffsetTop = navRef.current.getBoundingClientRect().top;
|
|
2000
2026
|
var navOffsetHeight = navRef.current.getBoundingClientRect().height;
|
|
2001
2027
|
var adSection = document.querySelector('.AD728x90');
|
|
2002
|
-
window.addEventListener('scroll', function () {
|
|
2028
|
+
var stickyNav = window.addEventListener('scroll', function () {
|
|
2003
2029
|
if (window.pageYOffset > navOffsetTop) {
|
|
2004
2030
|
if (navRef.current && navRef.current.style) {
|
|
2005
2031
|
navRef.current.style.position = 'fixed';
|
|
@@ -2016,6 +2042,9 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
2016
2042
|
}
|
|
2017
2043
|
}
|
|
2018
2044
|
});
|
|
2045
|
+
return function () {
|
|
2046
|
+
window.removeEventListener('scroll', stickyNav);
|
|
2047
|
+
};
|
|
2019
2048
|
}, []);
|
|
2020
2049
|
|
|
2021
2050
|
var trackScrolling = function trackScrolling() {
|
|
@@ -10,7 +10,7 @@ import { i as imageUrlBuilder } from './index-ca4ff5cb.js';
|
|
|
10
10
|
import { L as LazyLoad } from './index-3c1ee9ab.js';
|
|
11
11
|
import { a as main_36 } from './main-dea495b7.js';
|
|
12
12
|
import { c as clean_html_1 } from './entities-e85d3a4a.js';
|
|
13
|
-
import { s as slicedToArray, _ as _extends, t as toConsumableArray } from './_babelHelpers-
|
|
13
|
+
import { s as slicedToArray, _ as _extends, t as toConsumableArray } from './_babelHelpers-c212c59c.js';
|
|
14
14
|
import { Container, Media } from 'react-bootstrap';
|
|
15
15
|
|
|
16
16
|
var urlFor = function urlFor(source, builder) {
|
|
@@ -166,7 +166,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
166
166
|
return React__default.createElement(
|
|
167
167
|
'div',
|
|
168
168
|
null,
|
|
169
|
-
data && data.map(function (article, index) {
|
|
169
|
+
data && data.length > 0 ? data.map(function (article, index) {
|
|
170
170
|
var pageNumber = article.pageNumber || values.page;
|
|
171
171
|
var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
|
|
172
172
|
|
|
@@ -179,8 +179,9 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
179
179
|
VisibilitySensor,
|
|
180
180
|
{
|
|
181
181
|
key: article._id ? article._id : index,
|
|
182
|
+
partialVisibility: true,
|
|
182
183
|
onChange: function onChange(isVisible) {
|
|
183
|
-
isVisible && changePageNumber(
|
|
184
|
+
isVisible && changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage);
|
|
184
185
|
} },
|
|
185
186
|
React__default.createElement(
|
|
186
187
|
React__default.Fragment,
|
|
@@ -253,8 +254,9 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
253
254
|
VisibilitySensor,
|
|
254
255
|
{
|
|
255
256
|
key: article._id ? article._id : index,
|
|
257
|
+
partialVisibility: true,
|
|
256
258
|
onChange: function onChange(isVisible) {
|
|
257
|
-
isVisible && changePageNumber(
|
|
259
|
+
isVisible && changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage);
|
|
258
260
|
} },
|
|
259
261
|
React__default.createElement(
|
|
260
262
|
React__default.Fragment,
|
|
@@ -392,7 +394,19 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
392
394
|
),
|
|
393
395
|
main_36 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
|
|
394
396
|
);
|
|
395
|
-
})
|
|
397
|
+
}) : React__default.createElement(
|
|
398
|
+
'div',
|
|
399
|
+
null,
|
|
400
|
+
React__default.createElement(
|
|
401
|
+
'h5',
|
|
402
|
+
null,
|
|
403
|
+
React__default.createElement(
|
|
404
|
+
'em',
|
|
405
|
+
null,
|
|
406
|
+
'New content coming soon, please check back later.'
|
|
407
|
+
)
|
|
408
|
+
)
|
|
409
|
+
),
|
|
396
410
|
React__default.createElement(
|
|
397
411
|
'style',
|
|
398
412
|
{ jsx: 'true' },
|
|
@@ -6,7 +6,7 @@ import Col from 'react-bootstrap/Col';
|
|
|
6
6
|
import Card from 'react-bootstrap/Card';
|
|
7
7
|
import { n as node, i as imageUrlBuilder } from './index-ca4ff5cb.js';
|
|
8
8
|
import { L as LazyLoad } from './index-3c1ee9ab.js';
|
|
9
|
-
import { _ as _extends } from './_babelHelpers-
|
|
9
|
+
import { _ as _extends } from './_babelHelpers-c212c59c.js';
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
object-assign
|
package/dist/esm/TaxonomyCard.js
CHANGED
|
@@ -8,5 +8,5 @@ import 'react-bootstrap/Card';
|
|
|
8
8
|
import 'react-dom';
|
|
9
9
|
import './index-ca4ff5cb.js';
|
|
10
10
|
import './index-3c1ee9ab.js';
|
|
11
|
-
import './_babelHelpers-
|
|
12
|
-
export { T as default } from './TaxonomyCard-
|
|
11
|
+
import './_babelHelpers-c212c59c.js';
|
|
12
|
+
export { T as default } from './TaxonomyCard-92f9e327.js';
|
|
@@ -8,13 +8,13 @@ import 'react-bootstrap/Col';
|
|
|
8
8
|
import 'next/link';
|
|
9
9
|
import './debounce-dc0c02e5.js';
|
|
10
10
|
import './main-dea495b7.js';
|
|
11
|
-
import './_babelHelpers-
|
|
12
|
-
import './AdSlot-
|
|
11
|
+
import './_babelHelpers-c212c59c.js';
|
|
12
|
+
import './AdSlot-748bc6ff.js';
|
|
13
13
|
import './get-b074314b.js';
|
|
14
14
|
import 'react-bootstrap';
|
|
15
15
|
import './index.esm-536609db.js';
|
|
16
16
|
import 'react-bootstrap/Button';
|
|
17
|
-
export { T as default } from './Normal-
|
|
17
|
+
export { T as default } from './Normal-088cf5cf.js';
|
|
18
18
|
import 'react-bootstrap/ListGroup';
|
|
19
19
|
import 'next/head';
|
|
20
20
|
import 'react-bootstrap/Nav';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
2
|
-
import { s as slicedToArray } from './_babelHelpers-
|
|
2
|
+
import { s as slicedToArray } from './_babelHelpers-c212c59c.js';
|
|
3
3
|
import { G as GenIcon, d as IoIosOpen } from './index.esm-536609db.js';
|
|
4
4
|
|
|
5
5
|
// THIS FILE IS AUTO GENERATED
|
package/dist/esm/Ustream.js
CHANGED
|
@@ -9,7 +9,7 @@ import { withRouter } from 'next/router';
|
|
|
9
9
|
import { d as debounce_1 } from './debounce-dc0c02e5.js';
|
|
10
10
|
import 'react-dom';
|
|
11
11
|
import './index-3c1ee9ab.js';
|
|
12
|
-
import { i as inherits, c as createClass, a as classCallCheck, p as possibleConstructorReturn, _ as _extends } from './_babelHelpers-
|
|
12
|
+
import { i as inherits, c as createClass, a as classCallCheck, p as possibleConstructorReturn, _ as _extends } from './_babelHelpers-c212c59c.js';
|
|
13
13
|
import { Y as YoutubeGroup } from './YoutubeGroup-1368335c.js';
|
|
14
14
|
import { a as IoIosArrowForward } from './index.esm-536609db.js';
|
|
15
15
|
|