@mjhls/mjh-framework 1.0.697 → 1.0.698
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/ExternalResources.js +1 -1
- package/dist/cjs/PartnerDetailListing.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +20 -18
- package/dist/cjs/View.js +1 -1
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/getSerializers.js +1 -1
- package/dist/cjs/{index-a9422f8a.js → index-0c398de9.js} +115 -59
- package/dist/cjs/index.js +1 -1
- package/dist/esm/ExternalResources.js +1 -1
- package/dist/esm/PartnerDetailListing.js +1 -1
- package/dist/esm/VideoSeriesListing.js +20 -18
- package/dist/esm/View.js +1 -1
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/getSerializers.js +1 -1
- package/dist/esm/{index-ea6b6891.js → index-9c5bdccd.js} +115 -59
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ require('./iconBase-68959171.js');
|
|
|
48
48
|
require('./index.esm-90433435.js');
|
|
49
49
|
var Button = _interopDefault(require('react-bootstrap/Button'));
|
|
50
50
|
var index$3 = require('./index-5be2866f.js');
|
|
51
|
-
var getSerializers = require('./index-
|
|
51
|
+
var getSerializers = require('./index-0c398de9.js');
|
|
52
52
|
require('./util-f2c1b65b.js');
|
|
53
53
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
54
54
|
require('react-bootstrap/Pagination');
|
|
@@ -57,7 +57,7 @@ var QueueDeckExpanded = require('./QueueDeckExpanded.js');
|
|
|
57
57
|
require('./iconBase-68959171.js');
|
|
58
58
|
require('./index.esm-90433435.js');
|
|
59
59
|
require('react-bootstrap/Button');
|
|
60
|
-
var getSerializers = require('./index-
|
|
60
|
+
var getSerializers = require('./index-0c398de9.js');
|
|
61
61
|
require('./util-f2c1b65b.js');
|
|
62
62
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
63
63
|
require('react-bootstrap/Pagination');
|
|
@@ -52,25 +52,27 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
52
52
|
|
|
53
53
|
return _ret = (_temp = (_this = inherits._possibleConstructorReturn(this, (_ref = VideoSeriesListing.__proto__ || inherits._Object$getPrototypeOf(VideoSeriesListing)).call.apply(_ref, [this].concat(args))), _this), _this.page = _this.props.page, _this.mapping = _this.props.mapping, _this.data = _this.props.dataRecord, _this.query = _this.props.query, _this.params = _this.props.params, _this.today = moment.moment().utc().format(), _this.dataArr = [_this.data], _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.state = {
|
|
54
54
|
data: _this.dataArr.map(function (item) {
|
|
55
|
-
var tempObj = item
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
55
|
+
var tempObj = item.map(function (arrItem) {
|
|
56
|
+
if (arrItem.body) {
|
|
57
|
+
var filteredBody = arrItem.body.map(function (item) {
|
|
58
|
+
if (item._type === 'youtubeGallery') {
|
|
59
|
+
var innerObj = item;
|
|
60
|
+
var filteredArticles = innerObj.videos.filter(function (video) {
|
|
61
|
+
if ((video.is_visible === true || !video.hasOwnProperty('is_visible')) && (_this.today >= video.published || !video.hasOwnProperty('published'))) {
|
|
62
|
+
return video;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
innerObj.videos = filteredArticles;
|
|
66
|
+
return innerObj;
|
|
67
|
+
} else {
|
|
68
|
+
return item;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
arrItem.body = filteredBody;
|
|
73
|
+
}
|
|
74
|
+
return arrItem;
|
|
75
|
+
});
|
|
74
76
|
return tempObj;
|
|
75
77
|
}),
|
|
76
78
|
per: _this.params ? _this.params.to : 2,
|
package/dist/cjs/View.js
CHANGED
|
@@ -50,7 +50,7 @@ require('./index.esm-90433435.js');
|
|
|
50
50
|
var Button = _interopDefault(require('react-bootstrap/Button'));
|
|
51
51
|
var defineProperty$1 = require('./defineProperty-55548b25.js');
|
|
52
52
|
var Form = _interopDefault(require('react-bootstrap/Form'));
|
|
53
|
-
var getSerializers = require('./index-
|
|
53
|
+
var getSerializers = require('./index-0c398de9.js');
|
|
54
54
|
require('./util-f2c1b65b.js');
|
|
55
55
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
56
56
|
require('react-bootstrap/Pagination');
|
package/dist/cjs/YoutubeGroup.js
CHANGED
|
@@ -74,7 +74,7 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
74
74
|
var tileHeight = tileArray.current.map(function (tile) {
|
|
75
75
|
return tile.scrollHeight;
|
|
76
76
|
});
|
|
77
|
-
|
|
77
|
+
|
|
78
78
|
for (var ele in tileArray.current) {
|
|
79
79
|
var eleHeight = tileHeight[ele] < 185 ? 185 : tileHeight[ele];
|
|
80
80
|
tileArray.current[ele].style.height = eleHeight + 'px';
|
|
@@ -43,7 +43,7 @@ require('react-bootstrap');
|
|
|
43
43
|
require('./iconBase-68959171.js');
|
|
44
44
|
require('./index.esm-90433435.js');
|
|
45
45
|
require('react-bootstrap/Button');
|
|
46
|
-
var getSerializers = require('./index-
|
|
46
|
+
var getSerializers = require('./index-0c398de9.js');
|
|
47
47
|
require('./util-f2c1b65b.js');
|
|
48
48
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
49
49
|
require('react-bootstrap/Pagination');
|
|
@@ -7069,6 +7069,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7069
7069
|
var today = moment.moment().utc().format();
|
|
7070
7070
|
|
|
7071
7071
|
var Videos = nodes.videos.filter(function (video) {
|
|
7072
|
+
console.dir(video);
|
|
7072
7073
|
if ((video.is_visible === true || !video.hasOwnProperty('is_visible')) && (today >= video.published || !video.hasOwnProperty('published'))) {
|
|
7073
7074
|
return video;
|
|
7074
7075
|
}
|
|
@@ -8052,12 +8053,65 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8052
8053
|
var articleContainerRef = React.useRef(null);
|
|
8053
8054
|
var arrowRef = React.useRef(null);
|
|
8054
8055
|
|
|
8055
|
-
var
|
|
8056
|
+
var _ref2 = router && router.asPath && router.asPath.split('?')[1] ? React.useState(router.asPath.split('=')[1]) : React.useState(null),
|
|
8057
|
+
_ref3 = slicedToArray._slicedToArray(_ref2, 2),
|
|
8058
|
+
selectedArticle = _ref3[0],
|
|
8059
|
+
setSelectedArticle = _ref3[1];
|
|
8060
|
+
|
|
8061
|
+
var _useState = React.useState(false),
|
|
8056
8062
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
8057
|
-
|
|
8058
|
-
|
|
8063
|
+
firstLoad = _useState2[0],
|
|
8064
|
+
setFirstLoad = _useState2[1];
|
|
8065
|
+
|
|
8066
|
+
var _useState3 = React.useState(null),
|
|
8067
|
+
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
8068
|
+
currentURL = _useState4[0],
|
|
8069
|
+
setCurrentURL = _useState4[1];
|
|
8059
8070
|
|
|
8060
|
-
var
|
|
8071
|
+
var _useState5 = React.useState(null),
|
|
8072
|
+
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
8073
|
+
currentTitle = _useState6[0],
|
|
8074
|
+
setCurrentTitle = _useState6[1];
|
|
8075
|
+
|
|
8076
|
+
var _useState7 = React.useState(null),
|
|
8077
|
+
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
8078
|
+
currentSummary = _useState8[0],
|
|
8079
|
+
setCurrentSummary = _useState8[1];
|
|
8080
|
+
|
|
8081
|
+
var _useState9 = React.useState(null),
|
|
8082
|
+
_useState10 = slicedToArray._slicedToArray(_useState9, 2),
|
|
8083
|
+
currentThumbnail = _useState10[0],
|
|
8084
|
+
setCurrentThumbnail = _useState10[1];
|
|
8085
|
+
|
|
8086
|
+
var _useState11 = React.useState(null),
|
|
8087
|
+
_useState12 = slicedToArray._slicedToArray(_useState11, 2),
|
|
8088
|
+
sensorVisible = _useState12[0],
|
|
8089
|
+
setSensorVisible = _useState12[1];
|
|
8090
|
+
|
|
8091
|
+
var _useState13 = React.useState(0),
|
|
8092
|
+
_useState14 = slicedToArray._slicedToArray(_useState13, 2),
|
|
8093
|
+
contentWidth = _useState14[0],
|
|
8094
|
+
setContentWidth = _useState14[1];
|
|
8095
|
+
|
|
8096
|
+
var _useState15 = React.useState(false),
|
|
8097
|
+
_useState16 = slicedToArray._slicedToArray(_useState15, 2),
|
|
8098
|
+
upArrowClicked = _useState16[0],
|
|
8099
|
+
setUpArrowClicked = _useState16[1];
|
|
8100
|
+
|
|
8101
|
+
var _useState17 = React.useState(null),
|
|
8102
|
+
_useState18 = slicedToArray._slicedToArray(_useState17, 2),
|
|
8103
|
+
articleScrollHeight = _useState18[0],
|
|
8104
|
+
setArticleScrollHeight = _useState18[1];
|
|
8105
|
+
|
|
8106
|
+
var _useState19 = React.useState(false),
|
|
8107
|
+
_useState20 = slicedToArray._slicedToArray(_useState19, 2),
|
|
8108
|
+
articleClicked = _useState20[0],
|
|
8109
|
+
setArticleClicked = _useState20[1];
|
|
8110
|
+
|
|
8111
|
+
var _useState21 = React.useState(null),
|
|
8112
|
+
_useState22 = slicedToArray._slicedToArray(_useState21, 2),
|
|
8113
|
+
articleIndex = _useState22[0],
|
|
8114
|
+
setArticleIndex = _useState22[1];
|
|
8061
8115
|
|
|
8062
8116
|
var Articles = nodes.articles.filter(function (article) {
|
|
8063
8117
|
if ((article.is_visible === true || !article.hasOwnProperty('is_visible')) && today >= article.published) {
|
|
@@ -8090,7 +8144,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8090
8144
|
'a',
|
|
8091
8145
|
{ onClick: function onClick(e) {
|
|
8092
8146
|
return articleCardClickHandler(e);
|
|
8093
|
-
}, 'data-articleid': '' + article.param.current },
|
|
8147
|
+
}, 'data-cardlabel': '' + articleLabel, 'data-articleIndex': '' + index, 'data-articleid': '' + article.param.current },
|
|
8094
8148
|
React__default.createElement(
|
|
8095
8149
|
'div',
|
|
8096
8150
|
{ className: 'prevNext-thumbnail' },
|
|
@@ -8120,43 +8174,17 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8120
8174
|
});
|
|
8121
8175
|
};
|
|
8122
8176
|
|
|
8123
|
-
var _ref2 = router && router.asPath && router.asPath.split('?')[1] ? React.useState(router.asPath.split('=')[1]) : React.useState(null),
|
|
8124
|
-
_ref3 = slicedToArray._slicedToArray(_ref2, 2),
|
|
8125
|
-
selectedArticle = _ref3[0],
|
|
8126
|
-
setSelectedArticle = _ref3[1];
|
|
8127
|
-
|
|
8128
|
-
var _useState3 = React.useState(false),
|
|
8129
|
-
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
8130
|
-
firstLoad = _useState4[0],
|
|
8131
|
-
setFirstLoad = _useState4[1];
|
|
8132
|
-
|
|
8133
|
-
var _useState5 = React.useState(null),
|
|
8134
|
-
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
8135
|
-
currentURL = _useState6[0],
|
|
8136
|
-
setCurrentURL = _useState6[1];
|
|
8137
|
-
|
|
8138
|
-
var _useState7 = React.useState(null),
|
|
8139
|
-
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
8140
|
-
currentTitle = _useState8[0],
|
|
8141
|
-
setCurrentTitle = _useState8[1];
|
|
8142
|
-
|
|
8143
|
-
var _useState9 = React.useState(null),
|
|
8144
|
-
_useState10 = slicedToArray._slicedToArray(_useState9, 2),
|
|
8145
|
-
currentSummary = _useState10[0],
|
|
8146
|
-
setCurrentSummary = _useState10[1];
|
|
8147
|
-
|
|
8148
|
-
var _useState11 = React.useState(null),
|
|
8149
|
-
_useState12 = slicedToArray._slicedToArray(_useState11, 2),
|
|
8150
|
-
currentThumbnail = _useState12[0],
|
|
8151
|
-
setCurrentThumbnail = _useState12[1];
|
|
8152
|
-
|
|
8153
8177
|
var articleCardClickHandler = function articleCardClickHandler(e) {
|
|
8154
8178
|
e.preventDefault();
|
|
8155
8179
|
var articleClicked = e.currentTarget.dataset.articleid;
|
|
8180
|
+
setArticleClicked(true);
|
|
8181
|
+
setArticleIndex(e.currentTarget.dataset.articleindex);
|
|
8182
|
+
setSensorVisible(false);
|
|
8156
8183
|
setSelectedArticle(articleClicked);
|
|
8157
|
-
scrollToArticle(articleClicked);
|
|
8184
|
+
scrollToArticle(articleClicked, e.currentTarget.dataset.cardlabel);
|
|
8185
|
+
arrowRef.current.style.visibility = 'hidden';
|
|
8158
8186
|
};
|
|
8159
|
-
var scrollToArticle = function scrollToArticle(id) {
|
|
8187
|
+
var scrollToArticle = function scrollToArticle(id, cardLabel) {
|
|
8160
8188
|
var localArticleID = id ? id : selectedArticle;
|
|
8161
8189
|
var findArticle = function findArticle(ref) {
|
|
8162
8190
|
if (ref) {
|
|
@@ -8164,13 +8192,18 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8164
8192
|
}
|
|
8165
8193
|
return false;
|
|
8166
8194
|
};
|
|
8195
|
+
console.log('cardLabel', cardLabel);
|
|
8196
|
+
var isNextPrev = cardLabel === 'Next' || 'Previous' ? true : false;
|
|
8197
|
+
console.log(isNextPrev);
|
|
8167
8198
|
var indexOfRef = refArray.current.findIndex(findArticle);
|
|
8168
|
-
|
|
8169
8199
|
if (indexOfRef >= 0) {
|
|
8170
8200
|
var newOffsetTop = !firstLoad ? refArray.current[indexOfRef].wraperRef.current.offsetTop : refArray.current[indexOfRef].wraperRef.current.offsetTop + document.getElementsByTagName('header')[0].clientHeight;
|
|
8171
8201
|
// console.dir(refArray.current[indexOfRef].wraperRef.current)
|
|
8172
8202
|
// console.log(document.getElementsByTagName('header')[0].clientHeight)
|
|
8173
8203
|
// console.log(refArray.current[indexOfRef].wraperRef.current.offsetTop)
|
|
8204
|
+
|
|
8205
|
+
setArticleScrollHeight(newOffsetTop);
|
|
8206
|
+
|
|
8174
8207
|
window.scrollTo({ top: newOffsetTop, behavior: 'smooth' });
|
|
8175
8208
|
//refArray.current[indexOfRef].wraperRef.current.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
|
8176
8209
|
}
|
|
@@ -8183,6 +8216,12 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8183
8216
|
}
|
|
8184
8217
|
};
|
|
8185
8218
|
|
|
8219
|
+
React.useEffect(function () {
|
|
8220
|
+
if (articleClicked === true) {
|
|
8221
|
+
onChangeArticle(Articles[articleIndex].param.current, 'top', Articles[articleIndex].title, Articles[articleIndex].summary, urlFor(Articles[articleIndex].thumbnail.asset).url());
|
|
8222
|
+
}
|
|
8223
|
+
}, [articleClicked]);
|
|
8224
|
+
|
|
8186
8225
|
var onChangeArticle = function onChangeArticle(path, visibility, title, summary, shareImage) {
|
|
8187
8226
|
var currentPath = window && window.location && window.location.pathname ? window.location.pathname.replace('?seriesArticle=', '') : '';
|
|
8188
8227
|
var newPath = (router && router.asPath && router.asPath.split('?')[0]) + '?seriesArticle=' + path;
|
|
@@ -8222,7 +8261,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8222
8261
|
var window = e.currentTarget;
|
|
8223
8262
|
if (preVscroll > window.scrollY) {
|
|
8224
8263
|
isScrollDown = false;
|
|
8225
|
-
if (window.scrollY > articleContainerRef.current.offsetTop && preVscroll !== 0 &&
|
|
8264
|
+
if (window.scrollY > articleContainerRef.current.offsetTop && preVscroll !== 0 && upArrowClicked === false && articleClicked === false) {
|
|
8226
8265
|
arrowRef.current.style.visibility = 'visible';
|
|
8227
8266
|
}
|
|
8228
8267
|
} else if (preVscroll < window.scrollY) {
|
|
@@ -8236,8 +8275,15 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8236
8275
|
if (preVscroll <= articleContainerRef.current.offsetTop) {
|
|
8237
8276
|
arrowRef.current.style.visibility = 'hidden';
|
|
8238
8277
|
}
|
|
8278
|
+
if (window.scrollY >= articleScrollHeight && articleClicked === true) {
|
|
8279
|
+
setArticleClicked(false);
|
|
8280
|
+
setSensorVisible(true);
|
|
8281
|
+
setUpArrowClicked(false);
|
|
8282
|
+
}
|
|
8239
8283
|
if (window.scrollY === 0 && upArrowClicked === true) {
|
|
8240
|
-
|
|
8284
|
+
setUpArrowClicked(false);
|
|
8285
|
+
setSensorVisible(true);
|
|
8286
|
+
setArticleClicked(false);
|
|
8241
8287
|
}
|
|
8242
8288
|
};
|
|
8243
8289
|
|
|
@@ -8251,6 +8297,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8251
8297
|
React.useLayoutEffect(function () {
|
|
8252
8298
|
//console.log('useLayoutEffect')
|
|
8253
8299
|
if (!firstLoad) {
|
|
8300
|
+
setUpArrowClicked(false);
|
|
8254
8301
|
if (main.main_39) {
|
|
8255
8302
|
grabLoadedAds();
|
|
8256
8303
|
} else {
|
|
@@ -8293,26 +8340,34 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8293
8340
|
}
|
|
8294
8341
|
};
|
|
8295
8342
|
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
|
|
8299
|
-
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
|
|
8343
|
+
React.useEffect(function () {
|
|
8344
|
+
console.log('sensorVisible Effect');
|
|
8345
|
+
if (sensorVisible === false && articleClicked === false) {
|
|
8346
|
+
var newPath = router.asPath.split('?')[0];
|
|
8347
|
+
var title = nodes.seriesTitle;
|
|
8348
|
+
isScrollDown = true;
|
|
8349
|
+
setUpArrowClicked(true);
|
|
8350
|
+
arrowRef.current.style.visibility = 'hidden';
|
|
8351
|
+
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
8352
|
+
window.history.pushState({}, '', newPath);
|
|
8353
|
+
document.title = title;
|
|
8305
8354
|
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8355
|
+
setCurrentURL(newPath);
|
|
8356
|
+
setCurrentTitle(title);
|
|
8357
|
+
if (rootArticle) {
|
|
8358
|
+
setCurrentSummary(rootArticle.summary ? rootArticle.summary : '');
|
|
8359
|
+
setCurrentThumbnail(urlFor(rootArticle.thumbnail.asset).url());
|
|
8360
|
+
} else {
|
|
8361
|
+
setCurrentSummary('');
|
|
8362
|
+
setCurrentThumbnail('');
|
|
8363
|
+
}
|
|
8364
|
+
refreshAD(newPath);
|
|
8314
8365
|
}
|
|
8315
|
-
|
|
8366
|
+
}, [sensorVisible]);
|
|
8367
|
+
|
|
8368
|
+
var handleArrowClick = function handleArrowClick() {
|
|
8369
|
+
console.log('handleArrowClick');
|
|
8370
|
+
setSensorVisible(false);
|
|
8316
8371
|
};
|
|
8317
8372
|
|
|
8318
8373
|
return React__default.createElement(
|
|
@@ -8376,6 +8431,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8376
8431
|
React__default.createElement(
|
|
8377
8432
|
InscreenSensor,
|
|
8378
8433
|
{
|
|
8434
|
+
visible: sensorVisible,
|
|
8379
8435
|
offSetTop: 120,
|
|
8380
8436
|
className: 'inscreen-wrapper',
|
|
8381
8437
|
key: '' + article.param.current,
|
|
@@ -8384,7 +8440,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8384
8440
|
return refArray.current[index] = ele;
|
|
8385
8441
|
},
|
|
8386
8442
|
onChange: function onChange(visible) {
|
|
8387
|
-
if (
|
|
8443
|
+
if (upArrowClicked === false && articleClicked === false) {
|
|
8388
8444
|
if (visible === 'top' || visible === 'bottom' || visible === 'small-top') {
|
|
8389
8445
|
onChangeArticle(article.param.current, visible, article.title, article.summary, urlFor(article.thumbnail.asset).url());
|
|
8390
8446
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -83,7 +83,7 @@ require('react-bootstrap/Form');
|
|
|
83
83
|
require('./index-5be2866f.js');
|
|
84
84
|
require('./js.cookie-a511c430.js');
|
|
85
85
|
var CMEDeck = require('./CMEDeck.js');
|
|
86
|
-
var getSerializers = require('./index-
|
|
86
|
+
var getSerializers = require('./index-0c398de9.js');
|
|
87
87
|
require('./util-f2c1b65b.js');
|
|
88
88
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
89
89
|
require('react-bootstrap/Pagination');
|
|
@@ -42,7 +42,7 @@ import './iconBase-602d52fe.js';
|
|
|
42
42
|
import './index.esm-29e48d38.js';
|
|
43
43
|
import Button from 'react-bootstrap/Button';
|
|
44
44
|
import { m as momentTimezone } from './index-d2f90501.js';
|
|
45
|
-
import { g as getSerializers } from './index-
|
|
45
|
+
import { g as getSerializers } from './index-9c5bdccd.js';
|
|
46
46
|
import './util-7700fc59.js';
|
|
47
47
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
48
48
|
import 'react-bootstrap/Pagination';
|
|
@@ -51,7 +51,7 @@ import QueueDeckExpanded from './QueueDeckExpanded.js';
|
|
|
51
51
|
import './iconBase-602d52fe.js';
|
|
52
52
|
import './index.esm-29e48d38.js';
|
|
53
53
|
import 'react-bootstrap/Button';
|
|
54
|
-
import { g as getSerializers } from './index-
|
|
54
|
+
import { g as getSerializers } from './index-9c5bdccd.js';
|
|
55
55
|
import './util-7700fc59.js';
|
|
56
56
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
57
57
|
import 'react-bootstrap/Pagination';
|
|
@@ -46,25 +46,27 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
46
46
|
|
|
47
47
|
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = VideoSeriesListing.__proto__ || _Object$getPrototypeOf(VideoSeriesListing)).call.apply(_ref, [this].concat(args))), _this), _this.page = _this.props.page, _this.mapping = _this.props.mapping, _this.data = _this.props.dataRecord, _this.query = _this.props.query, _this.params = _this.props.params, _this.today = moment().utc().format(), _this.dataArr = [_this.data], _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.state = {
|
|
48
48
|
data: _this.dataArr.map(function (item) {
|
|
49
|
-
var tempObj = item
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
49
|
+
var tempObj = item.map(function (arrItem) {
|
|
50
|
+
if (arrItem.body) {
|
|
51
|
+
var filteredBody = arrItem.body.map(function (item) {
|
|
52
|
+
if (item._type === 'youtubeGallery') {
|
|
53
|
+
var innerObj = item;
|
|
54
|
+
var filteredArticles = innerObj.videos.filter(function (video) {
|
|
55
|
+
if ((video.is_visible === true || !video.hasOwnProperty('is_visible')) && (_this.today >= video.published || !video.hasOwnProperty('published'))) {
|
|
56
|
+
return video;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
innerObj.videos = filteredArticles;
|
|
60
|
+
return innerObj;
|
|
61
|
+
} else {
|
|
62
|
+
return item;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
arrItem.body = filteredBody;
|
|
67
|
+
}
|
|
68
|
+
return arrItem;
|
|
69
|
+
});
|
|
68
70
|
return tempObj;
|
|
69
71
|
}),
|
|
70
72
|
per: _this.params ? _this.params.to : 2,
|
package/dist/esm/View.js
CHANGED
|
@@ -44,7 +44,7 @@ import './index.esm-29e48d38.js';
|
|
|
44
44
|
import Button from 'react-bootstrap/Button';
|
|
45
45
|
import { _ as _defineProperty } from './defineProperty-b798470d.js';
|
|
46
46
|
import Form from 'react-bootstrap/Form';
|
|
47
|
-
import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-
|
|
47
|
+
import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-9c5bdccd.js';
|
|
48
48
|
import './util-7700fc59.js';
|
|
49
49
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
50
50
|
import 'react-bootstrap/Pagination';
|
package/dist/esm/YoutubeGroup.js
CHANGED
|
@@ -69,7 +69,7 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
69
69
|
var tileHeight = tileArray.current.map(function (tile) {
|
|
70
70
|
return tile.scrollHeight;
|
|
71
71
|
});
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
for (var ele in tileArray.current) {
|
|
74
74
|
var eleHeight = tileHeight[ele] < 185 ? 185 : tileHeight[ele];
|
|
75
75
|
tileArray.current[ele].style.height = eleHeight + 'px';
|
|
@@ -41,7 +41,7 @@ import 'react-bootstrap';
|
|
|
41
41
|
import './iconBase-602d52fe.js';
|
|
42
42
|
import './index.esm-29e48d38.js';
|
|
43
43
|
import 'react-bootstrap/Button';
|
|
44
|
-
export { g as default } from './index-
|
|
44
|
+
export { g as default } from './index-9c5bdccd.js';
|
|
45
45
|
import './util-7700fc59.js';
|
|
46
46
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
47
47
|
import 'react-bootstrap/Pagination';
|
|
@@ -7062,6 +7062,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7062
7062
|
var today = moment().utc().format();
|
|
7063
7063
|
|
|
7064
7064
|
var Videos = nodes.videos.filter(function (video) {
|
|
7065
|
+
console.dir(video);
|
|
7065
7066
|
if ((video.is_visible === true || !video.hasOwnProperty('is_visible')) && (today >= video.published || !video.hasOwnProperty('published'))) {
|
|
7066
7067
|
return video;
|
|
7067
7068
|
}
|
|
@@ -8045,12 +8046,65 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8045
8046
|
var articleContainerRef = useRef(null);
|
|
8046
8047
|
var arrowRef = useRef(null);
|
|
8047
8048
|
|
|
8048
|
-
var
|
|
8049
|
+
var _ref2 = router && router.asPath && router.asPath.split('?')[1] ? useState(router.asPath.split('=')[1]) : useState(null),
|
|
8050
|
+
_ref3 = _slicedToArray(_ref2, 2),
|
|
8051
|
+
selectedArticle = _ref3[0],
|
|
8052
|
+
setSelectedArticle = _ref3[1];
|
|
8053
|
+
|
|
8054
|
+
var _useState = useState(false),
|
|
8049
8055
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8050
|
-
|
|
8051
|
-
|
|
8056
|
+
firstLoad = _useState2[0],
|
|
8057
|
+
setFirstLoad = _useState2[1];
|
|
8058
|
+
|
|
8059
|
+
var _useState3 = useState(null),
|
|
8060
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
8061
|
+
currentURL = _useState4[0],
|
|
8062
|
+
setCurrentURL = _useState4[1];
|
|
8052
8063
|
|
|
8053
|
-
var
|
|
8064
|
+
var _useState5 = useState(null),
|
|
8065
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
8066
|
+
currentTitle = _useState6[0],
|
|
8067
|
+
setCurrentTitle = _useState6[1];
|
|
8068
|
+
|
|
8069
|
+
var _useState7 = useState(null),
|
|
8070
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
8071
|
+
currentSummary = _useState8[0],
|
|
8072
|
+
setCurrentSummary = _useState8[1];
|
|
8073
|
+
|
|
8074
|
+
var _useState9 = useState(null),
|
|
8075
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
8076
|
+
currentThumbnail = _useState10[0],
|
|
8077
|
+
setCurrentThumbnail = _useState10[1];
|
|
8078
|
+
|
|
8079
|
+
var _useState11 = useState(null),
|
|
8080
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
8081
|
+
sensorVisible = _useState12[0],
|
|
8082
|
+
setSensorVisible = _useState12[1];
|
|
8083
|
+
|
|
8084
|
+
var _useState13 = useState(0),
|
|
8085
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
8086
|
+
contentWidth = _useState14[0],
|
|
8087
|
+
setContentWidth = _useState14[1];
|
|
8088
|
+
|
|
8089
|
+
var _useState15 = useState(false),
|
|
8090
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
8091
|
+
upArrowClicked = _useState16[0],
|
|
8092
|
+
setUpArrowClicked = _useState16[1];
|
|
8093
|
+
|
|
8094
|
+
var _useState17 = useState(null),
|
|
8095
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
8096
|
+
articleScrollHeight = _useState18[0],
|
|
8097
|
+
setArticleScrollHeight = _useState18[1];
|
|
8098
|
+
|
|
8099
|
+
var _useState19 = useState(false),
|
|
8100
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
8101
|
+
articleClicked = _useState20[0],
|
|
8102
|
+
setArticleClicked = _useState20[1];
|
|
8103
|
+
|
|
8104
|
+
var _useState21 = useState(null),
|
|
8105
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
8106
|
+
articleIndex = _useState22[0],
|
|
8107
|
+
setArticleIndex = _useState22[1];
|
|
8054
8108
|
|
|
8055
8109
|
var Articles = nodes.articles.filter(function (article) {
|
|
8056
8110
|
if ((article.is_visible === true || !article.hasOwnProperty('is_visible')) && today >= article.published) {
|
|
@@ -8083,7 +8137,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8083
8137
|
'a',
|
|
8084
8138
|
{ onClick: function onClick(e) {
|
|
8085
8139
|
return articleCardClickHandler(e);
|
|
8086
|
-
}, 'data-articleid': '' + article.param.current },
|
|
8140
|
+
}, 'data-cardlabel': '' + articleLabel, 'data-articleIndex': '' + index, 'data-articleid': '' + article.param.current },
|
|
8087
8141
|
React__default.createElement(
|
|
8088
8142
|
'div',
|
|
8089
8143
|
{ className: 'prevNext-thumbnail' },
|
|
@@ -8113,43 +8167,17 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8113
8167
|
});
|
|
8114
8168
|
};
|
|
8115
8169
|
|
|
8116
|
-
var _ref2 = router && router.asPath && router.asPath.split('?')[1] ? useState(router.asPath.split('=')[1]) : useState(null),
|
|
8117
|
-
_ref3 = _slicedToArray(_ref2, 2),
|
|
8118
|
-
selectedArticle = _ref3[0],
|
|
8119
|
-
setSelectedArticle = _ref3[1];
|
|
8120
|
-
|
|
8121
|
-
var _useState3 = useState(false),
|
|
8122
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
8123
|
-
firstLoad = _useState4[0],
|
|
8124
|
-
setFirstLoad = _useState4[1];
|
|
8125
|
-
|
|
8126
|
-
var _useState5 = useState(null),
|
|
8127
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
8128
|
-
currentURL = _useState6[0],
|
|
8129
|
-
setCurrentURL = _useState6[1];
|
|
8130
|
-
|
|
8131
|
-
var _useState7 = useState(null),
|
|
8132
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
8133
|
-
currentTitle = _useState8[0],
|
|
8134
|
-
setCurrentTitle = _useState8[1];
|
|
8135
|
-
|
|
8136
|
-
var _useState9 = useState(null),
|
|
8137
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
8138
|
-
currentSummary = _useState10[0],
|
|
8139
|
-
setCurrentSummary = _useState10[1];
|
|
8140
|
-
|
|
8141
|
-
var _useState11 = useState(null),
|
|
8142
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
8143
|
-
currentThumbnail = _useState12[0],
|
|
8144
|
-
setCurrentThumbnail = _useState12[1];
|
|
8145
|
-
|
|
8146
8170
|
var articleCardClickHandler = function articleCardClickHandler(e) {
|
|
8147
8171
|
e.preventDefault();
|
|
8148
8172
|
var articleClicked = e.currentTarget.dataset.articleid;
|
|
8173
|
+
setArticleClicked(true);
|
|
8174
|
+
setArticleIndex(e.currentTarget.dataset.articleindex);
|
|
8175
|
+
setSensorVisible(false);
|
|
8149
8176
|
setSelectedArticle(articleClicked);
|
|
8150
|
-
scrollToArticle(articleClicked);
|
|
8177
|
+
scrollToArticle(articleClicked, e.currentTarget.dataset.cardlabel);
|
|
8178
|
+
arrowRef.current.style.visibility = 'hidden';
|
|
8151
8179
|
};
|
|
8152
|
-
var scrollToArticle = function scrollToArticle(id) {
|
|
8180
|
+
var scrollToArticle = function scrollToArticle(id, cardLabel) {
|
|
8153
8181
|
var localArticleID = id ? id : selectedArticle;
|
|
8154
8182
|
var findArticle = function findArticle(ref) {
|
|
8155
8183
|
if (ref) {
|
|
@@ -8157,13 +8185,18 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8157
8185
|
}
|
|
8158
8186
|
return false;
|
|
8159
8187
|
};
|
|
8188
|
+
console.log('cardLabel', cardLabel);
|
|
8189
|
+
var isNextPrev = cardLabel === 'Next' || 'Previous' ? true : false;
|
|
8190
|
+
console.log(isNextPrev);
|
|
8160
8191
|
var indexOfRef = refArray.current.findIndex(findArticle);
|
|
8161
|
-
|
|
8162
8192
|
if (indexOfRef >= 0) {
|
|
8163
8193
|
var newOffsetTop = !firstLoad ? refArray.current[indexOfRef].wraperRef.current.offsetTop : refArray.current[indexOfRef].wraperRef.current.offsetTop + document.getElementsByTagName('header')[0].clientHeight;
|
|
8164
8194
|
// console.dir(refArray.current[indexOfRef].wraperRef.current)
|
|
8165
8195
|
// console.log(document.getElementsByTagName('header')[0].clientHeight)
|
|
8166
8196
|
// console.log(refArray.current[indexOfRef].wraperRef.current.offsetTop)
|
|
8197
|
+
|
|
8198
|
+
setArticleScrollHeight(newOffsetTop);
|
|
8199
|
+
|
|
8167
8200
|
window.scrollTo({ top: newOffsetTop, behavior: 'smooth' });
|
|
8168
8201
|
//refArray.current[indexOfRef].wraperRef.current.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
|
8169
8202
|
}
|
|
@@ -8176,6 +8209,12 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8176
8209
|
}
|
|
8177
8210
|
};
|
|
8178
8211
|
|
|
8212
|
+
useEffect(function () {
|
|
8213
|
+
if (articleClicked === true) {
|
|
8214
|
+
onChangeArticle(Articles[articleIndex].param.current, 'top', Articles[articleIndex].title, Articles[articleIndex].summary, urlFor(Articles[articleIndex].thumbnail.asset).url());
|
|
8215
|
+
}
|
|
8216
|
+
}, [articleClicked]);
|
|
8217
|
+
|
|
8179
8218
|
var onChangeArticle = function onChangeArticle(path, visibility, title, summary, shareImage) {
|
|
8180
8219
|
var currentPath = window && window.location && window.location.pathname ? window.location.pathname.replace('?seriesArticle=', '') : '';
|
|
8181
8220
|
var newPath = (router && router.asPath && router.asPath.split('?')[0]) + '?seriesArticle=' + path;
|
|
@@ -8215,7 +8254,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8215
8254
|
var window = e.currentTarget;
|
|
8216
8255
|
if (preVscroll > window.scrollY) {
|
|
8217
8256
|
isScrollDown = false;
|
|
8218
|
-
if (window.scrollY > articleContainerRef.current.offsetTop && preVscroll !== 0 &&
|
|
8257
|
+
if (window.scrollY > articleContainerRef.current.offsetTop && preVscroll !== 0 && upArrowClicked === false && articleClicked === false) {
|
|
8219
8258
|
arrowRef.current.style.visibility = 'visible';
|
|
8220
8259
|
}
|
|
8221
8260
|
} else if (preVscroll < window.scrollY) {
|
|
@@ -8229,8 +8268,15 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8229
8268
|
if (preVscroll <= articleContainerRef.current.offsetTop) {
|
|
8230
8269
|
arrowRef.current.style.visibility = 'hidden';
|
|
8231
8270
|
}
|
|
8271
|
+
if (window.scrollY >= articleScrollHeight && articleClicked === true) {
|
|
8272
|
+
setArticleClicked(false);
|
|
8273
|
+
setSensorVisible(true);
|
|
8274
|
+
setUpArrowClicked(false);
|
|
8275
|
+
}
|
|
8232
8276
|
if (window.scrollY === 0 && upArrowClicked === true) {
|
|
8233
|
-
|
|
8277
|
+
setUpArrowClicked(false);
|
|
8278
|
+
setSensorVisible(true);
|
|
8279
|
+
setArticleClicked(false);
|
|
8234
8280
|
}
|
|
8235
8281
|
};
|
|
8236
8282
|
|
|
@@ -8244,6 +8290,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8244
8290
|
useLayoutEffect(function () {
|
|
8245
8291
|
//console.log('useLayoutEffect')
|
|
8246
8292
|
if (!firstLoad) {
|
|
8293
|
+
setUpArrowClicked(false);
|
|
8247
8294
|
if (main_39) {
|
|
8248
8295
|
grabLoadedAds();
|
|
8249
8296
|
} else {
|
|
@@ -8286,26 +8333,34 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8286
8333
|
}
|
|
8287
8334
|
};
|
|
8288
8335
|
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
-
|
|
8294
|
-
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
|
|
8336
|
+
useEffect(function () {
|
|
8337
|
+
console.log('sensorVisible Effect');
|
|
8338
|
+
if (sensorVisible === false && articleClicked === false) {
|
|
8339
|
+
var newPath = router.asPath.split('?')[0];
|
|
8340
|
+
var title = nodes.seriesTitle;
|
|
8341
|
+
isScrollDown = true;
|
|
8342
|
+
setUpArrowClicked(true);
|
|
8343
|
+
arrowRef.current.style.visibility = 'hidden';
|
|
8344
|
+
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
8345
|
+
window.history.pushState({}, '', newPath);
|
|
8346
|
+
document.title = title;
|
|
8298
8347
|
|
|
8299
|
-
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
|
|
8305
|
-
|
|
8306
|
-
|
|
8348
|
+
setCurrentURL(newPath);
|
|
8349
|
+
setCurrentTitle(title);
|
|
8350
|
+
if (rootArticle) {
|
|
8351
|
+
setCurrentSummary(rootArticle.summary ? rootArticle.summary : '');
|
|
8352
|
+
setCurrentThumbnail(urlFor(rootArticle.thumbnail.asset).url());
|
|
8353
|
+
} else {
|
|
8354
|
+
setCurrentSummary('');
|
|
8355
|
+
setCurrentThumbnail('');
|
|
8356
|
+
}
|
|
8357
|
+
refreshAD(newPath);
|
|
8307
8358
|
}
|
|
8308
|
-
|
|
8359
|
+
}, [sensorVisible]);
|
|
8360
|
+
|
|
8361
|
+
var handleArrowClick = function handleArrowClick() {
|
|
8362
|
+
console.log('handleArrowClick');
|
|
8363
|
+
setSensorVisible(false);
|
|
8309
8364
|
};
|
|
8310
8365
|
|
|
8311
8366
|
return React__default.createElement(
|
|
@@ -8369,6 +8424,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8369
8424
|
React__default.createElement(
|
|
8370
8425
|
InscreenSensor,
|
|
8371
8426
|
{
|
|
8427
|
+
visible: sensorVisible,
|
|
8372
8428
|
offSetTop: 120,
|
|
8373
8429
|
className: 'inscreen-wrapper',
|
|
8374
8430
|
key: '' + article.param.current,
|
|
@@ -8377,7 +8433,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8377
8433
|
return refArray.current[index] = ele;
|
|
8378
8434
|
},
|
|
8379
8435
|
onChange: function onChange(visible) {
|
|
8380
|
-
if (
|
|
8436
|
+
if (upArrowClicked === false && articleClicked === false) {
|
|
8381
8437
|
if (visible === 'top' || visible === 'bottom' || visible === 'small-top') {
|
|
8382
8438
|
onChangeArticle(article.param.current, visible, article.title, article.summary, urlFor(article.thumbnail.asset).url());
|
|
8383
8439
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -79,7 +79,7 @@ import 'react-bootstrap/Form';
|
|
|
79
79
|
import './index-d2f90501.js';
|
|
80
80
|
import './js.cookie-6874175c.js';
|
|
81
81
|
export { default as CMEDeck } from './CMEDeck.js';
|
|
82
|
-
export { g as getSerializers } from './index-
|
|
82
|
+
export { g as getSerializers } from './index-9c5bdccd.js';
|
|
83
83
|
import './util-7700fc59.js';
|
|
84
84
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
85
85
|
import 'react-bootstrap/Pagination';
|