@mjhls/mjh-framework 1.0.696-1034 → 1.0.696-1034-2
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 +2 -1
- package/dist/cjs/PartnerDetailListing.js +2 -1
- package/dist/cjs/VideoSeriesListing.js +20 -18
- package/dist/cjs/View.js +3 -2
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/getSerializers.js +2 -1
- package/dist/cjs/{index-8e495016.js → index-7a6308f1.js} +162 -82
- package/dist/cjs/index.js +2 -1
- package/dist/esm/ExternalResources.js +2 -1
- package/dist/esm/PartnerDetailListing.js +2 -1
- package/dist/esm/VideoSeriesListing.js +20 -18
- package/dist/esm/View.js +3 -2
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/getSerializers.js +2 -1
- package/dist/esm/{index-6a239712.js → index-d3fdad5e.js} +162 -82
- package/dist/esm/index.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,11 +48,12 @@ 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-7a6308f1.js');
|
|
52
52
|
require('./util-f2c1b65b.js');
|
|
53
53
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
54
54
|
require('react-bootstrap/Pagination');
|
|
55
55
|
require('next/head');
|
|
56
|
+
require('react-bootstrap/Figure');
|
|
56
57
|
|
|
57
58
|
var ExternalResources = function ExternalResources(props) {
|
|
58
59
|
var resources = props.resources,
|
|
@@ -57,11 +57,12 @@ 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-7a6308f1.js');
|
|
61
61
|
require('./util-f2c1b65b.js');
|
|
62
62
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
63
63
|
require('react-bootstrap/Pagination');
|
|
64
64
|
require('next/head');
|
|
65
|
+
require('react-bootstrap/Figure');
|
|
65
66
|
require('react-bootstrap/Carousel');
|
|
66
67
|
var Feature = require('./Feature.js');
|
|
67
68
|
require('react-bootstrap/Breadcrumb');
|
|
@@ -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
|
@@ -51,11 +51,12 @@ require('./index.esm-90433435.js');
|
|
|
51
51
|
var Button = _interopDefault(require('react-bootstrap/Button'));
|
|
52
52
|
var defineProperty$1 = require('./defineProperty-55548b25.js');
|
|
53
53
|
var Form = _interopDefault(require('react-bootstrap/Form'));
|
|
54
|
-
var getSerializers = require('./index-
|
|
54
|
+
var getSerializers = require('./index-7a6308f1.js');
|
|
55
55
|
require('./util-f2c1b65b.js');
|
|
56
56
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
57
57
|
require('react-bootstrap/Pagination');
|
|
58
58
|
var Head = _interopDefault(require('next/head'));
|
|
59
|
+
require('react-bootstrap/Figure');
|
|
59
60
|
require('react-share');
|
|
60
61
|
var SocialShare = require('./SocialShare.js');
|
|
61
62
|
var FormControl = _interopDefault(require('react-bootstrap/FormControl'));
|
|
@@ -819,7 +820,7 @@ var Article = function Article(props) {
|
|
|
819
820
|
partialVisibility: true,
|
|
820
821
|
offset: { bottom: 100, top: containerHeight - 100 },
|
|
821
822
|
onChange: function onChange(isVisible) {
|
|
822
|
-
if (isVisible) {
|
|
823
|
+
if (isVisible && queueData.length > 1) {
|
|
823
824
|
onChangeArticle(url, meta);
|
|
824
825
|
setVisibleFlag(function () {
|
|
825
826
|
return true;
|
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,11 +43,12 @@ 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-7a6308f1.js');
|
|
47
47
|
require('./util-f2c1b65b.js');
|
|
48
48
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
49
49
|
require('react-bootstrap/Pagination');
|
|
50
50
|
require('next/head');
|
|
51
|
+
require('react-bootstrap/Figure');
|
|
51
52
|
|
|
52
53
|
|
|
53
54
|
|
|
@@ -35,6 +35,7 @@ var util = require('./util-f2c1b65b.js');
|
|
|
35
35
|
var brightcoveReactPlayerLoader_es = require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
36
36
|
var Pagination = _interopDefault(require('react-bootstrap/Pagination'));
|
|
37
37
|
var Head = _interopDefault(require('next/head'));
|
|
38
|
+
var Figure$1 = _interopDefault(require('react-bootstrap/Figure'));
|
|
38
39
|
|
|
39
40
|
var urlFor = function urlFor(source, builder) {
|
|
40
41
|
return builder.image(source).auto('format');
|
|
@@ -7068,6 +7069,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7068
7069
|
var today = moment.moment().utc().format();
|
|
7069
7070
|
|
|
7070
7071
|
var Videos = nodes.videos.filter(function (video) {
|
|
7072
|
+
console.dir(video);
|
|
7071
7073
|
if ((video.is_visible === true || !video.hasOwnProperty('is_visible')) && (today >= video.published || !video.hasOwnProperty('published'))) {
|
|
7072
7074
|
return video;
|
|
7073
7075
|
}
|
|
@@ -8051,12 +8053,65 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8051
8053
|
var articleContainerRef = React.useRef(null);
|
|
8052
8054
|
var arrowRef = React.useRef(null);
|
|
8053
8055
|
|
|
8054
|
-
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),
|
|
8055
8062
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
8056
|
-
|
|
8057
|
-
|
|
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];
|
|
8070
|
+
|
|
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];
|
|
8058
8095
|
|
|
8059
|
-
var
|
|
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];
|
|
8060
8115
|
|
|
8061
8116
|
var Articles = nodes.articles.filter(function (article) {
|
|
8062
8117
|
if ((article.is_visible === true || !article.hasOwnProperty('is_visible')) && today >= article.published) {
|
|
@@ -8089,7 +8144,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8089
8144
|
'a',
|
|
8090
8145
|
{ onClick: function onClick(e) {
|
|
8091
8146
|
return articleCardClickHandler(e);
|
|
8092
|
-
}, 'data-articleid': '' + article.param.current },
|
|
8147
|
+
}, 'data-cardlabel': '' + articleLabel, 'data-articleIndex': '' + index, 'data-articleid': '' + article.param.current },
|
|
8093
8148
|
React__default.createElement(
|
|
8094
8149
|
'div',
|
|
8095
8150
|
{ className: 'prevNext-thumbnail' },
|
|
@@ -8119,43 +8174,17 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8119
8174
|
});
|
|
8120
8175
|
};
|
|
8121
8176
|
|
|
8122
|
-
var _ref2 = router && router.asPath && router.asPath.split('?')[1] ? React.useState(router.asPath.split('=')[1]) : React.useState(null),
|
|
8123
|
-
_ref3 = slicedToArray._slicedToArray(_ref2, 2),
|
|
8124
|
-
selectedArticle = _ref3[0],
|
|
8125
|
-
setSelectedArticle = _ref3[1];
|
|
8126
|
-
|
|
8127
|
-
var _useState3 = React.useState(false),
|
|
8128
|
-
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
8129
|
-
firstLoad = _useState4[0],
|
|
8130
|
-
setFirstLoad = _useState4[1];
|
|
8131
|
-
|
|
8132
|
-
var _useState5 = React.useState(null),
|
|
8133
|
-
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
8134
|
-
currentURL = _useState6[0],
|
|
8135
|
-
setCurrentURL = _useState6[1];
|
|
8136
|
-
|
|
8137
|
-
var _useState7 = React.useState(null),
|
|
8138
|
-
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
8139
|
-
currentTitle = _useState8[0],
|
|
8140
|
-
setCurrentTitle = _useState8[1];
|
|
8141
|
-
|
|
8142
|
-
var _useState9 = React.useState(null),
|
|
8143
|
-
_useState10 = slicedToArray._slicedToArray(_useState9, 2),
|
|
8144
|
-
currentSummary = _useState10[0],
|
|
8145
|
-
setCurrentSummary = _useState10[1];
|
|
8146
|
-
|
|
8147
|
-
var _useState11 = React.useState(null),
|
|
8148
|
-
_useState12 = slicedToArray._slicedToArray(_useState11, 2),
|
|
8149
|
-
currentThumbnail = _useState12[0],
|
|
8150
|
-
setCurrentThumbnail = _useState12[1];
|
|
8151
|
-
|
|
8152
8177
|
var articleCardClickHandler = function articleCardClickHandler(e) {
|
|
8153
8178
|
e.preventDefault();
|
|
8154
8179
|
var articleClicked = e.currentTarget.dataset.articleid;
|
|
8180
|
+
setArticleClicked(true);
|
|
8181
|
+
setArticleIndex(e.currentTarget.dataset.articleindex);
|
|
8182
|
+
setSensorVisible(false);
|
|
8155
8183
|
setSelectedArticle(articleClicked);
|
|
8156
|
-
scrollToArticle(articleClicked);
|
|
8184
|
+
scrollToArticle(articleClicked, e.currentTarget.dataset.cardlabel);
|
|
8185
|
+
arrowRef.current.style.visibility = 'hidden';
|
|
8157
8186
|
};
|
|
8158
|
-
var scrollToArticle = function scrollToArticle(id) {
|
|
8187
|
+
var scrollToArticle = function scrollToArticle(id, cardLabel) {
|
|
8159
8188
|
var localArticleID = id ? id : selectedArticle;
|
|
8160
8189
|
var findArticle = function findArticle(ref) {
|
|
8161
8190
|
if (ref) {
|
|
@@ -8163,13 +8192,18 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8163
8192
|
}
|
|
8164
8193
|
return false;
|
|
8165
8194
|
};
|
|
8195
|
+
console.log('cardLabel', cardLabel);
|
|
8196
|
+
var isNextPrev = cardLabel === 'Next' || 'Previous' ? true : false;
|
|
8197
|
+
console.log(isNextPrev);
|
|
8166
8198
|
var indexOfRef = refArray.current.findIndex(findArticle);
|
|
8167
|
-
|
|
8168
8199
|
if (indexOfRef >= 0) {
|
|
8169
8200
|
var newOffsetTop = !firstLoad ? refArray.current[indexOfRef].wraperRef.current.offsetTop : refArray.current[indexOfRef].wraperRef.current.offsetTop + document.getElementsByTagName('header')[0].clientHeight;
|
|
8170
8201
|
// console.dir(refArray.current[indexOfRef].wraperRef.current)
|
|
8171
8202
|
// console.log(document.getElementsByTagName('header')[0].clientHeight)
|
|
8172
8203
|
// console.log(refArray.current[indexOfRef].wraperRef.current.offsetTop)
|
|
8204
|
+
|
|
8205
|
+
setArticleScrollHeight(newOffsetTop);
|
|
8206
|
+
|
|
8173
8207
|
window.scrollTo({ top: newOffsetTop, behavior: 'smooth' });
|
|
8174
8208
|
//refArray.current[indexOfRef].wraperRef.current.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
|
8175
8209
|
}
|
|
@@ -8182,6 +8216,12 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8182
8216
|
}
|
|
8183
8217
|
};
|
|
8184
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
|
+
|
|
8185
8225
|
var onChangeArticle = function onChangeArticle(path, visibility, title, summary, shareImage) {
|
|
8186
8226
|
var currentPath = window && window.location && window.location.pathname ? window.location.pathname.replace('?seriesArticle=', '') : '';
|
|
8187
8227
|
var newPath = (router && router.asPath && router.asPath.split('?')[0]) + '?seriesArticle=' + path;
|
|
@@ -8221,7 +8261,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8221
8261
|
var window = e.currentTarget;
|
|
8222
8262
|
if (preVscroll > window.scrollY) {
|
|
8223
8263
|
isScrollDown = false;
|
|
8224
|
-
if (window.scrollY > articleContainerRef.current.offsetTop && preVscroll !== 0 &&
|
|
8264
|
+
if (window.scrollY > articleContainerRef.current.offsetTop && preVscroll !== 0 && upArrowClicked === false && articleClicked === false) {
|
|
8225
8265
|
arrowRef.current.style.visibility = 'visible';
|
|
8226
8266
|
}
|
|
8227
8267
|
} else if (preVscroll < window.scrollY) {
|
|
@@ -8235,8 +8275,15 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8235
8275
|
if (preVscroll <= articleContainerRef.current.offsetTop) {
|
|
8236
8276
|
arrowRef.current.style.visibility = 'hidden';
|
|
8237
8277
|
}
|
|
8278
|
+
if (window.scrollY >= articleScrollHeight && articleClicked === true) {
|
|
8279
|
+
setArticleClicked(false);
|
|
8280
|
+
setSensorVisible(true);
|
|
8281
|
+
setUpArrowClicked(false);
|
|
8282
|
+
}
|
|
8238
8283
|
if (window.scrollY === 0 && upArrowClicked === true) {
|
|
8239
|
-
|
|
8284
|
+
setUpArrowClicked(false);
|
|
8285
|
+
setSensorVisible(true);
|
|
8286
|
+
setArticleClicked(false);
|
|
8240
8287
|
}
|
|
8241
8288
|
};
|
|
8242
8289
|
|
|
@@ -8250,6 +8297,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8250
8297
|
React.useLayoutEffect(function () {
|
|
8251
8298
|
//console.log('useLayoutEffect')
|
|
8252
8299
|
if (!firstLoad) {
|
|
8300
|
+
setUpArrowClicked(false);
|
|
8253
8301
|
if (main.main_39) {
|
|
8254
8302
|
grabLoadedAds();
|
|
8255
8303
|
} else {
|
|
@@ -8292,26 +8340,34 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8292
8340
|
}
|
|
8293
8341
|
};
|
|
8294
8342
|
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
|
|
8299
|
-
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
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;
|
|
8304
8354
|
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
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);
|
|
8313
8365
|
}
|
|
8314
|
-
|
|
8366
|
+
}, [sensorVisible]);
|
|
8367
|
+
|
|
8368
|
+
var handleArrowClick = function handleArrowClick() {
|
|
8369
|
+
console.log('handleArrowClick');
|
|
8370
|
+
setSensorVisible(false);
|
|
8315
8371
|
};
|
|
8316
8372
|
|
|
8317
8373
|
return React__default.createElement(
|
|
@@ -8375,6 +8431,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8375
8431
|
React__default.createElement(
|
|
8376
8432
|
InscreenSensor,
|
|
8377
8433
|
{
|
|
8434
|
+
visible: sensorVisible,
|
|
8378
8435
|
offSetTop: 120,
|
|
8379
8436
|
className: 'inscreen-wrapper',
|
|
8380
8437
|
key: '' + article.param.current,
|
|
@@ -8383,7 +8440,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8383
8440
|
return refArray.current[index] = ele;
|
|
8384
8441
|
},
|
|
8385
8442
|
onChange: function onChange(visible) {
|
|
8386
|
-
if (
|
|
8443
|
+
if (upArrowClicked === false && articleClicked === false) {
|
|
8387
8444
|
if (visible === 'top' || visible === 'bottom' || visible === 'small-top') {
|
|
8388
8445
|
onChangeArticle(article.param.current, visible, article.title, article.summary, urlFor(article.thumbnail.asset).url());
|
|
8389
8446
|
}
|
|
@@ -8556,12 +8613,14 @@ var FigureComponent = function FigureComponent(props) {
|
|
|
8556
8613
|
if (typeof window === 'undefined') return null;
|
|
8557
8614
|
|
|
8558
8615
|
var node = props.node,
|
|
8559
|
-
client = props.client
|
|
8616
|
+
client = props.client,
|
|
8617
|
+
getSerializers = props.getSerializers;
|
|
8560
8618
|
|
|
8561
8619
|
|
|
8562
8620
|
if (!node.asset) return null;
|
|
8563
8621
|
|
|
8564
8622
|
var caption = node.caption,
|
|
8623
|
+
imgcaption = node.imgcaption,
|
|
8565
8624
|
alt = node.alt,
|
|
8566
8625
|
blank = node.blank,
|
|
8567
8626
|
link = node.link,
|
|
@@ -8613,6 +8672,18 @@ var FigureComponent = function FigureComponent(props) {
|
|
|
8613
8672
|
imageWidth = '100%';
|
|
8614
8673
|
}
|
|
8615
8674
|
|
|
8675
|
+
var FigureCaption = React.useCallback(function () {
|
|
8676
|
+
if (imgcaption && imgcaption.length > 0) {
|
|
8677
|
+
return React__default.createElement(
|
|
8678
|
+
'div',
|
|
8679
|
+
{ className: 'figure-caption' },
|
|
8680
|
+
React__default.createElement(BlockContent.BlockContent, { blocks: imgcaption, serializers: getSerializers })
|
|
8681
|
+
);
|
|
8682
|
+
} else if (caption) {
|
|
8683
|
+
return React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } });
|
|
8684
|
+
} else return null;
|
|
8685
|
+
}, [caption, imgcaption]);
|
|
8686
|
+
|
|
8616
8687
|
var figureStyle = disableTextWrap ? { maxWidth: '100%', width: imageWidth, margin: imageFloat !== 'none' ? imageFloat === 'left' ? '' : '0 0 0 auto' : '' } : {
|
|
8617
8688
|
width: imageWidth,
|
|
8618
8689
|
maxWidth: '100%',
|
|
@@ -8625,17 +8696,17 @@ var FigureComponent = function FigureComponent(props) {
|
|
|
8625
8696
|
React__default.Fragment,
|
|
8626
8697
|
null,
|
|
8627
8698
|
React__default.createElement(
|
|
8628
|
-
|
|
8699
|
+
Figure$1,
|
|
8629
8700
|
{ className: '' + class_name, style: figureStyle },
|
|
8630
8701
|
link ? React__default.createElement(
|
|
8631
8702
|
'a',
|
|
8632
8703
|
{ target: blank ? '_blank' : '_self', href: link },
|
|
8633
|
-
React__default.createElement(
|
|
8634
|
-
|
|
8704
|
+
React__default.createElement(Figure$1.Image, { style: { maxWidth: '100%' }, className: 'figure-image', src: urlFor$3(node, client).url(), alt: alt && alt }),
|
|
8705
|
+
React__default.createElement(FigureCaption, null)
|
|
8635
8706
|
) : React__default.createElement(
|
|
8636
8707
|
React__default.Fragment,
|
|
8637
8708
|
null,
|
|
8638
|
-
React__default.createElement(
|
|
8709
|
+
React__default.createElement(Figure$1.Image, {
|
|
8639
8710
|
style: { maxWidth: '100%', cursor: 'pointer', width: 'auto' },
|
|
8640
8711
|
className: 'figure-image',
|
|
8641
8712
|
src: urlFor$3(node, client).url(),
|
|
@@ -8645,7 +8716,7 @@ var FigureComponent = function FigureComponent(props) {
|
|
|
8645
8716
|
setShowLightbox(true);
|
|
8646
8717
|
}
|
|
8647
8718
|
}),
|
|
8648
|
-
|
|
8719
|
+
React__default.createElement(FigureCaption, null)
|
|
8649
8720
|
),
|
|
8650
8721
|
React__default.createElement(LightBox, {
|
|
8651
8722
|
showLightbox: showLightbox,
|
|
@@ -8659,7 +8730,7 @@ var FigureComponent = function FigureComponent(props) {
|
|
|
8659
8730
|
React__default.createElement(
|
|
8660
8731
|
'style',
|
|
8661
8732
|
{ jsx: 'true' },
|
|
8662
|
-
'\n .figure-caption
|
|
8733
|
+
'\n .figure-caption,\n .figure-caption h1,\n .figure-caption h2,\n .figure-caption h3,\n .figure-caption h4,\n .figure-caption h5,\n .figure-caption h6,\n .figure-caption p,\n .figure-caption ul {\n color: #6c757d;\n font-size: 0.875rem;\n }\n '
|
|
8663
8734
|
)
|
|
8664
8735
|
);
|
|
8665
8736
|
};
|
|
@@ -8688,7 +8759,8 @@ function useOutsideAlerter(ref, container, setOpenImg, setOpenImgSrc) {
|
|
|
8688
8759
|
|
|
8689
8760
|
var MultiFigure = function MultiFigure(props) {
|
|
8690
8761
|
var images = props.node.images,
|
|
8691
|
-
client = props.client
|
|
8762
|
+
client = props.client,
|
|
8763
|
+
getSerializers = props.getSerializers;
|
|
8692
8764
|
|
|
8693
8765
|
var _useState = React.useState(false),
|
|
8694
8766
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
@@ -8703,16 +8775,32 @@ var MultiFigure = function MultiFigure(props) {
|
|
|
8703
8775
|
var lightboxImage = React.useRef(null);
|
|
8704
8776
|
var lightboxContainer = React.useRef(null);
|
|
8705
8777
|
useOutsideAlerter(lightboxImage, lightboxContainer, setOpenImg, setOpenImgSrc);
|
|
8778
|
+
|
|
8779
|
+
var FigureCaption = function FigureCaption(_ref) {
|
|
8780
|
+
var caption = _ref.caption,
|
|
8781
|
+
imgcaption = _ref.imgcaption;
|
|
8782
|
+
|
|
8783
|
+
if (imgcaption && imgcaption.length > 0) {
|
|
8784
|
+
return React__default.createElement(
|
|
8785
|
+
'div',
|
|
8786
|
+
{ className: 'multi-figure-caption' },
|
|
8787
|
+
React__default.createElement(BlockContent.BlockContent, { blocks: imgcaption, serializers: getSerializers })
|
|
8788
|
+
);
|
|
8789
|
+
} else if (caption) {
|
|
8790
|
+
return React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'multi-figure-caption\'>' + caption + '</span>' } });
|
|
8791
|
+
} else return null;
|
|
8792
|
+
};
|
|
8793
|
+
|
|
8706
8794
|
if (images && images.length > 0) {
|
|
8707
8795
|
return React__default.createElement(
|
|
8708
8796
|
'div',
|
|
8709
8797
|
{ className: 'multi-figure-container' },
|
|
8710
8798
|
React__default.createElement(
|
|
8711
|
-
|
|
8799
|
+
Row,
|
|
8712
8800
|
{ noGutters: true },
|
|
8713
8801
|
images.map(function (image, index) {
|
|
8714
8802
|
return React__default.createElement(
|
|
8715
|
-
|
|
8803
|
+
Col,
|
|
8716
8804
|
{ xs: 12, md: 12 / images.length, key: index },
|
|
8717
8805
|
image.link ? React__default.createElement(
|
|
8718
8806
|
'a',
|
|
@@ -8725,11 +8813,7 @@ var MultiFigure = function MultiFigure(props) {
|
|
|
8725
8813
|
{ once: true },
|
|
8726
8814
|
React__default.createElement('img', { 'images-count': images.length, className: 'multi-figure-image', src: urlFor$4(image.asset, client).url(), alt: image.alt })
|
|
8727
8815
|
),
|
|
8728
|
-
image.caption
|
|
8729
|
-
'span',
|
|
8730
|
-
{ className: 'multi-figure-caption' },
|
|
8731
|
-
image.caption
|
|
8732
|
-
)
|
|
8816
|
+
React__default.createElement(FigureCaption, { caption: image.caption, imgcaption: image.imgcaption })
|
|
8733
8817
|
)
|
|
8734
8818
|
) : React__default.createElement(
|
|
8735
8819
|
'div',
|
|
@@ -8748,11 +8832,7 @@ var MultiFigure = function MultiFigure(props) {
|
|
|
8748
8832
|
}
|
|
8749
8833
|
})
|
|
8750
8834
|
),
|
|
8751
|
-
image.caption
|
|
8752
|
-
'span',
|
|
8753
|
-
{ className: 'multi-figure-caption' },
|
|
8754
|
-
image.caption
|
|
8755
|
-
)
|
|
8835
|
+
React__default.createElement(FigureCaption, { caption: image.caption, imgcaption: image.imgcaption })
|
|
8756
8836
|
)
|
|
8757
8837
|
);
|
|
8758
8838
|
})
|
|
@@ -8765,7 +8845,7 @@ var MultiFigure = function MultiFigure(props) {
|
|
|
8765
8845
|
React__default.createElement(
|
|
8766
8846
|
'style',
|
|
8767
8847
|
{ jsx: 'true' },
|
|
8768
|
-
'\n .multi-figure-container {\n margin-bottom: 1rem;\n }\n .multi-figure-image {\n width: 100%;\n height: auto;\n object-fit: cover;\n }\n .multi-figure-image-container {\n padding-right: 0.5rem;\n }\n /* Small devices (portrait tablets and phones, 767px and down) */\n @media (max-width: 767px) {\n .multi-figure-image-container {\n margin-bottom: 1rem;\n }\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media (min-width: 768px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 100px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 130px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 200px;\n }\n .multi-figure-container [class*=\'col-\'] + [class*=\'col-\'] {\n padding-left: 0.75rem;\n }\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media (min-width: 992px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 150px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 200px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 300px;\n }\n }\n\n
|
|
8848
|
+
'\n .multi-figure-caption,\n .multi-figure-caption h1,\n .multi-figure-caption h2,\n .multi-figure-caption h3,\n .multi-figure-caption h4,\n .multi-figure-caption h5,\n .multi-figure-caption h6,\n .multi-figure-caption p,\n .multi-figure-caption ul {\n color: #6c757d;\n font-size: 0.875rem;\n }\n\n .multi-figure-container {\n margin-bottom: 1rem;\n }\n .multi-figure-image {\n width: 100%;\n height: auto;\n object-fit: cover;\n }\n .multi-figure-image-container {\n padding-right: 0.5rem;\n }\n /* Small devices (portrait tablets and phones, 767px and down) */\n @media (max-width: 767px) {\n .multi-figure-image-container {\n margin-bottom: 1rem;\n }\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media (min-width: 768px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 100px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 130px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 200px;\n }\n .multi-figure-container [class*=\'col-\'] + [class*=\'col-\'] {\n padding-left: 0.75rem;\n }\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media (min-width: 992px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 150px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 200px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 300px;\n }\n }\n\n /* Styles the lightbox, removes it from sight and adds the fade-in transition */\n\n .lightbox-target {\n position: fixed;\n top: -100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.7);\n width: 100%;\n opacity: 0;\n -webkit-transition: opacity 0.5s ease-in-out;\n -moz-transition: opacity 0.5s ease-in-out;\n -o-transition: opacity 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n overflow: hidden;\n }\n\n .lightbox-target.close {\n opacity: 0;\n }\n\n /* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */\n\n .lightbox-target img {\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 0%;\n max-width: 0%;\n border: 3px solid white;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Styles the close link, adds the slide down transition */\n\n a.lightbox-close {\n display: block;\n width: 50px;\n height: 50px;\n box-sizing: border-box;\n background: white;\n color: black;\n text-decoration: none;\n position: absolute;\n top: -80px;\n right: 0;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:before {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:after {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(-45deg);\n -moz-transform: rotate(-45deg);\n -o-transform: rotate(-45deg);\n transform: rotate(-45deg);\n }\n\n /* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */\n\n .lightbox-target.open {\n opacity: 1;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 3000000;\n }\n\n .lightbox-target.open img {\n max-height: 100%;\n max-width: 100%;\n }\n\n .lightbox-target.open a.lightbox-close {\n top: 0px;\n }\n '
|
|
8769
8849
|
)
|
|
8770
8850
|
);
|
|
8771
8851
|
}
|
|
@@ -8874,12 +8954,12 @@ var getSerializers = function getSerializers() {
|
|
|
8874
8954
|
figure: function figure(_ref4) {
|
|
8875
8955
|
var node = _ref4.node;
|
|
8876
8956
|
|
|
8877
|
-
return React__default.createElement(Figure, { node: node, client: client, contextualADFlag: contextualADFlag });
|
|
8957
|
+
return React__default.createElement(Figure, { node: node, client: client, contextualADFlag: contextualADFlag, getSerializers: getSerializers.apply(undefined, props) });
|
|
8878
8958
|
},
|
|
8879
8959
|
multifigure: function multifigure(_ref5) {
|
|
8880
8960
|
var node = _ref5.node;
|
|
8881
8961
|
|
|
8882
|
-
return React__default.createElement(MultiFigure, { node: node, client: client });
|
|
8962
|
+
return React__default.createElement(MultiFigure, { node: node, client: client, getSerializers: getSerializers.apply(undefined, props) });
|
|
8883
8963
|
},
|
|
8884
8964
|
slideshow: function slideshow(_ref6) {
|
|
8885
8965
|
var node = _ref6.node;
|
package/dist/cjs/index.js
CHANGED
|
@@ -83,11 +83,12 @@ 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-7a6308f1.js');
|
|
87
87
|
require('./util-f2c1b65b.js');
|
|
88
88
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
89
89
|
require('react-bootstrap/Pagination');
|
|
90
90
|
require('next/head');
|
|
91
|
+
require('react-bootstrap/Figure');
|
|
91
92
|
var ExternalResources = require('./ExternalResources.js');
|
|
92
93
|
var Column1 = require('./Column1.js');
|
|
93
94
|
var SideFooter = require('./SideFooter.js');
|
|
@@ -42,11 +42,12 @@ 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-d3fdad5e.js';
|
|
46
46
|
import './util-7700fc59.js';
|
|
47
47
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
48
48
|
import 'react-bootstrap/Pagination';
|
|
49
49
|
import 'next/head';
|
|
50
|
+
import 'react-bootstrap/Figure';
|
|
50
51
|
|
|
51
52
|
var ExternalResources = function ExternalResources(props) {
|
|
52
53
|
var resources = props.resources,
|
|
@@ -51,11 +51,12 @@ 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-d3fdad5e.js';
|
|
55
55
|
import './util-7700fc59.js';
|
|
56
56
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
57
57
|
import 'react-bootstrap/Pagination';
|
|
58
58
|
import 'next/head';
|
|
59
|
+
import 'react-bootstrap/Figure';
|
|
59
60
|
import 'react-bootstrap/Carousel';
|
|
60
61
|
import Feature from './Feature.js';
|
|
61
62
|
import 'react-bootstrap/Breadcrumb';
|
|
@@ -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
|
@@ -45,11 +45,12 @@ import './index.esm-29e48d38.js';
|
|
|
45
45
|
import Button from 'react-bootstrap/Button';
|
|
46
46
|
import { _ as _defineProperty } from './defineProperty-b798470d.js';
|
|
47
47
|
import Form from 'react-bootstrap/Form';
|
|
48
|
-
import { r as renderAuthor, g as getSerializers } from './index-
|
|
48
|
+
import { r as renderAuthor, g as getSerializers } from './index-d3fdad5e.js';
|
|
49
49
|
import './util-7700fc59.js';
|
|
50
50
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
51
51
|
import 'react-bootstrap/Pagination';
|
|
52
52
|
import Head from 'next/head';
|
|
53
|
+
import 'react-bootstrap/Figure';
|
|
53
54
|
import 'react-share';
|
|
54
55
|
import SocialShare from './SocialShare.js';
|
|
55
56
|
import FormControl from 'react-bootstrap/FormControl';
|
|
@@ -813,7 +814,7 @@ var Article = function Article(props) {
|
|
|
813
814
|
partialVisibility: true,
|
|
814
815
|
offset: { bottom: 100, top: containerHeight - 100 },
|
|
815
816
|
onChange: function onChange(isVisible) {
|
|
816
|
-
if (isVisible) {
|
|
817
|
+
if (isVisible && queueData.length > 1) {
|
|
817
818
|
onChangeArticle(url, meta);
|
|
818
819
|
setVisibleFlag(function () {
|
|
819
820
|
return true;
|
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,8 +41,9 @@ 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-d3fdad5e.js';
|
|
45
45
|
import './util-7700fc59.js';
|
|
46
46
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
47
47
|
import 'react-bootstrap/Pagination';
|
|
48
48
|
import 'next/head';
|
|
49
|
+
import 'react-bootstrap/Figure';
|
|
@@ -28,6 +28,7 @@ import { u as util } from './util-7700fc59.js';
|
|
|
28
28
|
import { R as ReactPlayerLoader } from './brightcove-react-player-loader.es-83f53e4e.js';
|
|
29
29
|
import Pagination from 'react-bootstrap/Pagination';
|
|
30
30
|
import Head from 'next/head';
|
|
31
|
+
import Figure$1$1 from 'react-bootstrap/Figure';
|
|
31
32
|
|
|
32
33
|
var urlFor = function urlFor(source, builder) {
|
|
33
34
|
return builder.image(source).auto('format');
|
|
@@ -7061,6 +7062,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7061
7062
|
var today = moment().utc().format();
|
|
7062
7063
|
|
|
7063
7064
|
var Videos = nodes.videos.filter(function (video) {
|
|
7065
|
+
console.dir(video);
|
|
7064
7066
|
if ((video.is_visible === true || !video.hasOwnProperty('is_visible')) && (today >= video.published || !video.hasOwnProperty('published'))) {
|
|
7065
7067
|
return video;
|
|
7066
7068
|
}
|
|
@@ -8044,12 +8046,65 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8044
8046
|
var articleContainerRef = useRef(null);
|
|
8045
8047
|
var arrowRef = useRef(null);
|
|
8046
8048
|
|
|
8047
|
-
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),
|
|
8048
8055
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8049
|
-
|
|
8050
|
-
|
|
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];
|
|
8063
|
+
|
|
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];
|
|
8051
8088
|
|
|
8052
|
-
var
|
|
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];
|
|
8053
8108
|
|
|
8054
8109
|
var Articles = nodes.articles.filter(function (article) {
|
|
8055
8110
|
if ((article.is_visible === true || !article.hasOwnProperty('is_visible')) && today >= article.published) {
|
|
@@ -8082,7 +8137,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8082
8137
|
'a',
|
|
8083
8138
|
{ onClick: function onClick(e) {
|
|
8084
8139
|
return articleCardClickHandler(e);
|
|
8085
|
-
}, 'data-articleid': '' + article.param.current },
|
|
8140
|
+
}, 'data-cardlabel': '' + articleLabel, 'data-articleIndex': '' + index, 'data-articleid': '' + article.param.current },
|
|
8086
8141
|
React__default.createElement(
|
|
8087
8142
|
'div',
|
|
8088
8143
|
{ className: 'prevNext-thumbnail' },
|
|
@@ -8112,43 +8167,17 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8112
8167
|
});
|
|
8113
8168
|
};
|
|
8114
8169
|
|
|
8115
|
-
var _ref2 = router && router.asPath && router.asPath.split('?')[1] ? useState(router.asPath.split('=')[1]) : useState(null),
|
|
8116
|
-
_ref3 = _slicedToArray(_ref2, 2),
|
|
8117
|
-
selectedArticle = _ref3[0],
|
|
8118
|
-
setSelectedArticle = _ref3[1];
|
|
8119
|
-
|
|
8120
|
-
var _useState3 = useState(false),
|
|
8121
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
8122
|
-
firstLoad = _useState4[0],
|
|
8123
|
-
setFirstLoad = _useState4[1];
|
|
8124
|
-
|
|
8125
|
-
var _useState5 = useState(null),
|
|
8126
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
8127
|
-
currentURL = _useState6[0],
|
|
8128
|
-
setCurrentURL = _useState6[1];
|
|
8129
|
-
|
|
8130
|
-
var _useState7 = useState(null),
|
|
8131
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
8132
|
-
currentTitle = _useState8[0],
|
|
8133
|
-
setCurrentTitle = _useState8[1];
|
|
8134
|
-
|
|
8135
|
-
var _useState9 = useState(null),
|
|
8136
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
8137
|
-
currentSummary = _useState10[0],
|
|
8138
|
-
setCurrentSummary = _useState10[1];
|
|
8139
|
-
|
|
8140
|
-
var _useState11 = useState(null),
|
|
8141
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
8142
|
-
currentThumbnail = _useState12[0],
|
|
8143
|
-
setCurrentThumbnail = _useState12[1];
|
|
8144
|
-
|
|
8145
8170
|
var articleCardClickHandler = function articleCardClickHandler(e) {
|
|
8146
8171
|
e.preventDefault();
|
|
8147
8172
|
var articleClicked = e.currentTarget.dataset.articleid;
|
|
8173
|
+
setArticleClicked(true);
|
|
8174
|
+
setArticleIndex(e.currentTarget.dataset.articleindex);
|
|
8175
|
+
setSensorVisible(false);
|
|
8148
8176
|
setSelectedArticle(articleClicked);
|
|
8149
|
-
scrollToArticle(articleClicked);
|
|
8177
|
+
scrollToArticle(articleClicked, e.currentTarget.dataset.cardlabel);
|
|
8178
|
+
arrowRef.current.style.visibility = 'hidden';
|
|
8150
8179
|
};
|
|
8151
|
-
var scrollToArticle = function scrollToArticle(id) {
|
|
8180
|
+
var scrollToArticle = function scrollToArticle(id, cardLabel) {
|
|
8152
8181
|
var localArticleID = id ? id : selectedArticle;
|
|
8153
8182
|
var findArticle = function findArticle(ref) {
|
|
8154
8183
|
if (ref) {
|
|
@@ -8156,13 +8185,18 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8156
8185
|
}
|
|
8157
8186
|
return false;
|
|
8158
8187
|
};
|
|
8188
|
+
console.log('cardLabel', cardLabel);
|
|
8189
|
+
var isNextPrev = cardLabel === 'Next' || 'Previous' ? true : false;
|
|
8190
|
+
console.log(isNextPrev);
|
|
8159
8191
|
var indexOfRef = refArray.current.findIndex(findArticle);
|
|
8160
|
-
|
|
8161
8192
|
if (indexOfRef >= 0) {
|
|
8162
8193
|
var newOffsetTop = !firstLoad ? refArray.current[indexOfRef].wraperRef.current.offsetTop : refArray.current[indexOfRef].wraperRef.current.offsetTop + document.getElementsByTagName('header')[0].clientHeight;
|
|
8163
8194
|
// console.dir(refArray.current[indexOfRef].wraperRef.current)
|
|
8164
8195
|
// console.log(document.getElementsByTagName('header')[0].clientHeight)
|
|
8165
8196
|
// console.log(refArray.current[indexOfRef].wraperRef.current.offsetTop)
|
|
8197
|
+
|
|
8198
|
+
setArticleScrollHeight(newOffsetTop);
|
|
8199
|
+
|
|
8166
8200
|
window.scrollTo({ top: newOffsetTop, behavior: 'smooth' });
|
|
8167
8201
|
//refArray.current[indexOfRef].wraperRef.current.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
|
8168
8202
|
}
|
|
@@ -8175,6 +8209,12 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8175
8209
|
}
|
|
8176
8210
|
};
|
|
8177
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
|
+
|
|
8178
8218
|
var onChangeArticle = function onChangeArticle(path, visibility, title, summary, shareImage) {
|
|
8179
8219
|
var currentPath = window && window.location && window.location.pathname ? window.location.pathname.replace('?seriesArticle=', '') : '';
|
|
8180
8220
|
var newPath = (router && router.asPath && router.asPath.split('?')[0]) + '?seriesArticle=' + path;
|
|
@@ -8214,7 +8254,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8214
8254
|
var window = e.currentTarget;
|
|
8215
8255
|
if (preVscroll > window.scrollY) {
|
|
8216
8256
|
isScrollDown = false;
|
|
8217
|
-
if (window.scrollY > articleContainerRef.current.offsetTop && preVscroll !== 0 &&
|
|
8257
|
+
if (window.scrollY > articleContainerRef.current.offsetTop && preVscroll !== 0 && upArrowClicked === false && articleClicked === false) {
|
|
8218
8258
|
arrowRef.current.style.visibility = 'visible';
|
|
8219
8259
|
}
|
|
8220
8260
|
} else if (preVscroll < window.scrollY) {
|
|
@@ -8228,8 +8268,15 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8228
8268
|
if (preVscroll <= articleContainerRef.current.offsetTop) {
|
|
8229
8269
|
arrowRef.current.style.visibility = 'hidden';
|
|
8230
8270
|
}
|
|
8271
|
+
if (window.scrollY >= articleScrollHeight && articleClicked === true) {
|
|
8272
|
+
setArticleClicked(false);
|
|
8273
|
+
setSensorVisible(true);
|
|
8274
|
+
setUpArrowClicked(false);
|
|
8275
|
+
}
|
|
8231
8276
|
if (window.scrollY === 0 && upArrowClicked === true) {
|
|
8232
|
-
|
|
8277
|
+
setUpArrowClicked(false);
|
|
8278
|
+
setSensorVisible(true);
|
|
8279
|
+
setArticleClicked(false);
|
|
8233
8280
|
}
|
|
8234
8281
|
};
|
|
8235
8282
|
|
|
@@ -8243,6 +8290,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8243
8290
|
useLayoutEffect(function () {
|
|
8244
8291
|
//console.log('useLayoutEffect')
|
|
8245
8292
|
if (!firstLoad) {
|
|
8293
|
+
setUpArrowClicked(false);
|
|
8246
8294
|
if (main_39) {
|
|
8247
8295
|
grabLoadedAds();
|
|
8248
8296
|
} else {
|
|
@@ -8285,26 +8333,34 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8285
8333
|
}
|
|
8286
8334
|
};
|
|
8287
8335
|
|
|
8288
|
-
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
-
|
|
8294
|
-
|
|
8295
|
-
|
|
8296
|
-
|
|
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;
|
|
8297
8347
|
|
|
8298
|
-
|
|
8299
|
-
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
|
|
8305
|
-
|
|
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);
|
|
8306
8358
|
}
|
|
8307
|
-
|
|
8359
|
+
}, [sensorVisible]);
|
|
8360
|
+
|
|
8361
|
+
var handleArrowClick = function handleArrowClick() {
|
|
8362
|
+
console.log('handleArrowClick');
|
|
8363
|
+
setSensorVisible(false);
|
|
8308
8364
|
};
|
|
8309
8365
|
|
|
8310
8366
|
return React__default.createElement(
|
|
@@ -8368,6 +8424,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8368
8424
|
React__default.createElement(
|
|
8369
8425
|
InscreenSensor,
|
|
8370
8426
|
{
|
|
8427
|
+
visible: sensorVisible,
|
|
8371
8428
|
offSetTop: 120,
|
|
8372
8429
|
className: 'inscreen-wrapper',
|
|
8373
8430
|
key: '' + article.param.current,
|
|
@@ -8376,7 +8433,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8376
8433
|
return refArray.current[index] = ele;
|
|
8377
8434
|
},
|
|
8378
8435
|
onChange: function onChange(visible) {
|
|
8379
|
-
if (
|
|
8436
|
+
if (upArrowClicked === false && articleClicked === false) {
|
|
8380
8437
|
if (visible === 'top' || visible === 'bottom' || visible === 'small-top') {
|
|
8381
8438
|
onChangeArticle(article.param.current, visible, article.title, article.summary, urlFor(article.thumbnail.asset).url());
|
|
8382
8439
|
}
|
|
@@ -8549,12 +8606,14 @@ var FigureComponent = function FigureComponent(props) {
|
|
|
8549
8606
|
if (typeof window === 'undefined') return null;
|
|
8550
8607
|
|
|
8551
8608
|
var node = props.node,
|
|
8552
|
-
client = props.client
|
|
8609
|
+
client = props.client,
|
|
8610
|
+
getSerializers = props.getSerializers;
|
|
8553
8611
|
|
|
8554
8612
|
|
|
8555
8613
|
if (!node.asset) return null;
|
|
8556
8614
|
|
|
8557
8615
|
var caption = node.caption,
|
|
8616
|
+
imgcaption = node.imgcaption,
|
|
8558
8617
|
alt = node.alt,
|
|
8559
8618
|
blank = node.blank,
|
|
8560
8619
|
link = node.link,
|
|
@@ -8606,6 +8665,18 @@ var FigureComponent = function FigureComponent(props) {
|
|
|
8606
8665
|
imageWidth = '100%';
|
|
8607
8666
|
}
|
|
8608
8667
|
|
|
8668
|
+
var FigureCaption = useCallback(function () {
|
|
8669
|
+
if (imgcaption && imgcaption.length > 0) {
|
|
8670
|
+
return React__default.createElement(
|
|
8671
|
+
'div',
|
|
8672
|
+
{ className: 'figure-caption' },
|
|
8673
|
+
React__default.createElement(BlockContent, { blocks: imgcaption, serializers: getSerializers })
|
|
8674
|
+
);
|
|
8675
|
+
} else if (caption) {
|
|
8676
|
+
return React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } });
|
|
8677
|
+
} else return null;
|
|
8678
|
+
}, [caption, imgcaption]);
|
|
8679
|
+
|
|
8609
8680
|
var figureStyle = disableTextWrap ? { maxWidth: '100%', width: imageWidth, margin: imageFloat !== 'none' ? imageFloat === 'left' ? '' : '0 0 0 auto' : '' } : {
|
|
8610
8681
|
width: imageWidth,
|
|
8611
8682
|
maxWidth: '100%',
|
|
@@ -8618,17 +8689,17 @@ var FigureComponent = function FigureComponent(props) {
|
|
|
8618
8689
|
React__default.Fragment,
|
|
8619
8690
|
null,
|
|
8620
8691
|
React__default.createElement(
|
|
8621
|
-
Figure$1,
|
|
8692
|
+
Figure$1$1,
|
|
8622
8693
|
{ className: '' + class_name, style: figureStyle },
|
|
8623
8694
|
link ? React__default.createElement(
|
|
8624
8695
|
'a',
|
|
8625
8696
|
{ target: blank ? '_blank' : '_self', href: link },
|
|
8626
|
-
React__default.createElement(Figure$1.Image, { style: { maxWidth: '100%' }, className: 'figure-image', src: urlFor$3(node, client).url(), alt: alt && alt }),
|
|
8627
|
-
|
|
8697
|
+
React__default.createElement(Figure$1$1.Image, { style: { maxWidth: '100%' }, className: 'figure-image', src: urlFor$3(node, client).url(), alt: alt && alt }),
|
|
8698
|
+
React__default.createElement(FigureCaption, null)
|
|
8628
8699
|
) : React__default.createElement(
|
|
8629
8700
|
React__default.Fragment,
|
|
8630
8701
|
null,
|
|
8631
|
-
React__default.createElement(Figure$1.Image, {
|
|
8702
|
+
React__default.createElement(Figure$1$1.Image, {
|
|
8632
8703
|
style: { maxWidth: '100%', cursor: 'pointer', width: 'auto' },
|
|
8633
8704
|
className: 'figure-image',
|
|
8634
8705
|
src: urlFor$3(node, client).url(),
|
|
@@ -8638,7 +8709,7 @@ var FigureComponent = function FigureComponent(props) {
|
|
|
8638
8709
|
setShowLightbox(true);
|
|
8639
8710
|
}
|
|
8640
8711
|
}),
|
|
8641
|
-
|
|
8712
|
+
React__default.createElement(FigureCaption, null)
|
|
8642
8713
|
),
|
|
8643
8714
|
React__default.createElement(LightBox, {
|
|
8644
8715
|
showLightbox: showLightbox,
|
|
@@ -8652,7 +8723,7 @@ var FigureComponent = function FigureComponent(props) {
|
|
|
8652
8723
|
React__default.createElement(
|
|
8653
8724
|
'style',
|
|
8654
8725
|
{ jsx: 'true' },
|
|
8655
|
-
'\n .figure-caption
|
|
8726
|
+
'\n .figure-caption,\n .figure-caption h1,\n .figure-caption h2,\n .figure-caption h3,\n .figure-caption h4,\n .figure-caption h5,\n .figure-caption h6,\n .figure-caption p,\n .figure-caption ul {\n color: #6c757d;\n font-size: 0.875rem;\n }\n '
|
|
8656
8727
|
)
|
|
8657
8728
|
);
|
|
8658
8729
|
};
|
|
@@ -8681,7 +8752,8 @@ function useOutsideAlerter(ref, container, setOpenImg, setOpenImgSrc) {
|
|
|
8681
8752
|
|
|
8682
8753
|
var MultiFigure = function MultiFigure(props) {
|
|
8683
8754
|
var images = props.node.images,
|
|
8684
|
-
client = props.client
|
|
8755
|
+
client = props.client,
|
|
8756
|
+
getSerializers = props.getSerializers;
|
|
8685
8757
|
|
|
8686
8758
|
var _useState = useState(false),
|
|
8687
8759
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -8696,16 +8768,32 @@ var MultiFigure = function MultiFigure(props) {
|
|
|
8696
8768
|
var lightboxImage = useRef(null);
|
|
8697
8769
|
var lightboxContainer = useRef(null);
|
|
8698
8770
|
useOutsideAlerter(lightboxImage, lightboxContainer, setOpenImg, setOpenImgSrc);
|
|
8771
|
+
|
|
8772
|
+
var FigureCaption = function FigureCaption(_ref) {
|
|
8773
|
+
var caption = _ref.caption,
|
|
8774
|
+
imgcaption = _ref.imgcaption;
|
|
8775
|
+
|
|
8776
|
+
if (imgcaption && imgcaption.length > 0) {
|
|
8777
|
+
return React__default.createElement(
|
|
8778
|
+
'div',
|
|
8779
|
+
{ className: 'multi-figure-caption' },
|
|
8780
|
+
React__default.createElement(BlockContent, { blocks: imgcaption, serializers: getSerializers })
|
|
8781
|
+
);
|
|
8782
|
+
} else if (caption) {
|
|
8783
|
+
return React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'multi-figure-caption\'>' + caption + '</span>' } });
|
|
8784
|
+
} else return null;
|
|
8785
|
+
};
|
|
8786
|
+
|
|
8699
8787
|
if (images && images.length > 0) {
|
|
8700
8788
|
return React__default.createElement(
|
|
8701
8789
|
'div',
|
|
8702
8790
|
{ className: 'multi-figure-container' },
|
|
8703
8791
|
React__default.createElement(
|
|
8704
|
-
Row
|
|
8792
|
+
Row,
|
|
8705
8793
|
{ noGutters: true },
|
|
8706
8794
|
images.map(function (image, index) {
|
|
8707
8795
|
return React__default.createElement(
|
|
8708
|
-
Col
|
|
8796
|
+
Col,
|
|
8709
8797
|
{ xs: 12, md: 12 / images.length, key: index },
|
|
8710
8798
|
image.link ? React__default.createElement(
|
|
8711
8799
|
'a',
|
|
@@ -8718,11 +8806,7 @@ var MultiFigure = function MultiFigure(props) {
|
|
|
8718
8806
|
{ once: true },
|
|
8719
8807
|
React__default.createElement('img', { 'images-count': images.length, className: 'multi-figure-image', src: urlFor$4(image.asset, client).url(), alt: image.alt })
|
|
8720
8808
|
),
|
|
8721
|
-
image.caption
|
|
8722
|
-
'span',
|
|
8723
|
-
{ className: 'multi-figure-caption' },
|
|
8724
|
-
image.caption
|
|
8725
|
-
)
|
|
8809
|
+
React__default.createElement(FigureCaption, { caption: image.caption, imgcaption: image.imgcaption })
|
|
8726
8810
|
)
|
|
8727
8811
|
) : React__default.createElement(
|
|
8728
8812
|
'div',
|
|
@@ -8741,11 +8825,7 @@ var MultiFigure = function MultiFigure(props) {
|
|
|
8741
8825
|
}
|
|
8742
8826
|
})
|
|
8743
8827
|
),
|
|
8744
|
-
image.caption
|
|
8745
|
-
'span',
|
|
8746
|
-
{ className: 'multi-figure-caption' },
|
|
8747
|
-
image.caption
|
|
8748
|
-
)
|
|
8828
|
+
React__default.createElement(FigureCaption, { caption: image.caption, imgcaption: image.imgcaption })
|
|
8749
8829
|
)
|
|
8750
8830
|
);
|
|
8751
8831
|
})
|
|
@@ -8758,7 +8838,7 @@ var MultiFigure = function MultiFigure(props) {
|
|
|
8758
8838
|
React__default.createElement(
|
|
8759
8839
|
'style',
|
|
8760
8840
|
{ jsx: 'true' },
|
|
8761
|
-
'\n .multi-figure-container {\n margin-bottom: 1rem;\n }\n .multi-figure-image {\n width: 100%;\n height: auto;\n object-fit: cover;\n }\n .multi-figure-image-container {\n padding-right: 0.5rem;\n }\n /* Small devices (portrait tablets and phones, 767px and down) */\n @media (max-width: 767px) {\n .multi-figure-image-container {\n margin-bottom: 1rem;\n }\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media (min-width: 768px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 100px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 130px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 200px;\n }\n .multi-figure-container [class*=\'col-\'] + [class*=\'col-\'] {\n padding-left: 0.75rem;\n }\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media (min-width: 992px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 150px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 200px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 300px;\n }\n }\n\n
|
|
8841
|
+
'\n .multi-figure-caption,\n .multi-figure-caption h1,\n .multi-figure-caption h2,\n .multi-figure-caption h3,\n .multi-figure-caption h4,\n .multi-figure-caption h5,\n .multi-figure-caption h6,\n .multi-figure-caption p,\n .multi-figure-caption ul {\n color: #6c757d;\n font-size: 0.875rem;\n }\n\n .multi-figure-container {\n margin-bottom: 1rem;\n }\n .multi-figure-image {\n width: 100%;\n height: auto;\n object-fit: cover;\n }\n .multi-figure-image-container {\n padding-right: 0.5rem;\n }\n /* Small devices (portrait tablets and phones, 767px and down) */\n @media (max-width: 767px) {\n .multi-figure-image-container {\n margin-bottom: 1rem;\n }\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media (min-width: 768px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 100px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 130px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 200px;\n }\n .multi-figure-container [class*=\'col-\'] + [class*=\'col-\'] {\n padding-left: 0.75rem;\n }\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media (min-width: 992px) {\n .multi-figure-image[images-count=\'4\'] {\n height: 150px;\n }\n .multi-figure-image[images-count=\'3\'] {\n height: 200px;\n }\n .multi-figure-image[images-count=\'2\'] {\n height: 300px;\n }\n }\n\n /* Styles the lightbox, removes it from sight and adds the fade-in transition */\n\n .lightbox-target {\n position: fixed;\n top: -100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.7);\n width: 100%;\n opacity: 0;\n -webkit-transition: opacity 0.5s ease-in-out;\n -moz-transition: opacity 0.5s ease-in-out;\n -o-transition: opacity 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n overflow: hidden;\n }\n\n .lightbox-target.close {\n opacity: 0;\n }\n\n /* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */\n\n .lightbox-target img {\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 0%;\n max-width: 0%;\n border: 3px solid white;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Styles the close link, adds the slide down transition */\n\n a.lightbox-close {\n display: block;\n width: 50px;\n height: 50px;\n box-sizing: border-box;\n background: white;\n color: black;\n text-decoration: none;\n position: absolute;\n top: -80px;\n right: 0;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:before {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:after {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(-45deg);\n -moz-transform: rotate(-45deg);\n -o-transform: rotate(-45deg);\n transform: rotate(-45deg);\n }\n\n /* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */\n\n .lightbox-target.open {\n opacity: 1;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 3000000;\n }\n\n .lightbox-target.open img {\n max-height: 100%;\n max-width: 100%;\n }\n\n .lightbox-target.open a.lightbox-close {\n top: 0px;\n }\n '
|
|
8762
8842
|
)
|
|
8763
8843
|
);
|
|
8764
8844
|
}
|
|
@@ -8867,12 +8947,12 @@ var getSerializers = function getSerializers() {
|
|
|
8867
8947
|
figure: function figure(_ref4) {
|
|
8868
8948
|
var node = _ref4.node;
|
|
8869
8949
|
|
|
8870
|
-
return React__default.createElement(Figure, { node: node, client: client, contextualADFlag: contextualADFlag });
|
|
8950
|
+
return React__default.createElement(Figure, { node: node, client: client, contextualADFlag: contextualADFlag, getSerializers: getSerializers.apply(undefined, props) });
|
|
8871
8951
|
},
|
|
8872
8952
|
multifigure: function multifigure(_ref5) {
|
|
8873
8953
|
var node = _ref5.node;
|
|
8874
8954
|
|
|
8875
|
-
return React__default.createElement(MultiFigure, { node: node, client: client });
|
|
8955
|
+
return React__default.createElement(MultiFigure, { node: node, client: client, getSerializers: getSerializers.apply(undefined, props) });
|
|
8876
8956
|
},
|
|
8877
8957
|
slideshow: function slideshow(_ref6) {
|
|
8878
8958
|
var node = _ref6.node;
|
package/dist/esm/index.js
CHANGED
|
@@ -79,11 +79,12 @@ 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-d3fdad5e.js';
|
|
83
83
|
import './util-7700fc59.js';
|
|
84
84
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
85
85
|
import 'react-bootstrap/Pagination';
|
|
86
86
|
import 'next/head';
|
|
87
|
+
import 'react-bootstrap/Figure';
|
|
87
88
|
export { default as ExternalResources } from './ExternalResources.js';
|
|
88
89
|
export { Column1 } from './Column1.js';
|
|
89
90
|
export { default as SideFooter } from './SideFooter.js';
|