@mjhls/mjh-framework 1.0.736 → 1.0.738
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/ArticleProgramLandingPage.js +4 -2
- package/dist/cjs/ExternalResources.js +4 -2
- package/dist/cjs/HorizontalArticleListing.js +4 -2
- package/dist/cjs/MasterDeck.js +2 -6
- package/dist/cjs/PartnerDetailListing.js +4 -2
- package/dist/cjs/TaxonomyDescription.js +3 -1
- package/dist/cjs/VideoProgramLandingPage.js +4 -2
- package/dist/cjs/VideoSeriesCard.js +2 -2
- package/dist/cjs/VideoSeriesListing.js +13 -3
- package/dist/cjs/View.js +35 -14
- package/dist/cjs/getSerializers.js +4 -2
- package/dist/cjs/{index-5260126b.js → index-00b7a18a.js} +148 -101
- package/dist/cjs/index.js +1 -1
- package/dist/esm/ArticleProgramLandingPage.js +4 -2
- package/dist/esm/ExternalResources.js +4 -2
- package/dist/esm/HorizontalArticleListing.js +4 -2
- package/dist/esm/MasterDeck.js +2 -6
- package/dist/esm/PartnerDetailListing.js +4 -2
- package/dist/esm/TaxonomyDescription.js +3 -1
- package/dist/esm/VideoProgramLandingPage.js +4 -2
- package/dist/esm/VideoSeriesCard.js +2 -2
- package/dist/esm/VideoSeriesListing.js +13 -3
- package/dist/esm/View.js +35 -14
- package/dist/esm/getSerializers.js +4 -2
- package/dist/esm/{index-d6ad9248.js → index-a7f9ce66.js} +155 -108
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
package/dist/esm/View.js
CHANGED
|
@@ -13,7 +13,7 @@ import 'react-bootstrap/Dropdown';
|
|
|
13
13
|
import Form from 'react-bootstrap/Form';
|
|
14
14
|
import FormControl from 'react-bootstrap/FormControl';
|
|
15
15
|
import Button from 'react-bootstrap/Button';
|
|
16
|
-
import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-
|
|
16
|
+
import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-a7f9ce66.js';
|
|
17
17
|
import SocialShare from './SocialShare.js';
|
|
18
18
|
import DFPAdSlot from './AdSlot.js';
|
|
19
19
|
import { g as getTargeting, a as getContentPlacementUrl } from './getTargeting-2d402d66.js';
|
|
@@ -363,7 +363,7 @@ var RelatedArticle = function RelatedArticle(_ref) {
|
|
|
363
363
|
'a',
|
|
364
364
|
{ href: '/view/' + (article.url ? article.url.current : '') },
|
|
365
365
|
React.createElement(
|
|
366
|
-
'
|
|
366
|
+
'div',
|
|
367
367
|
{ className: styles.cardTitle },
|
|
368
368
|
article.title
|
|
369
369
|
)
|
|
@@ -686,7 +686,7 @@ var Article = function Article(props) {
|
|
|
686
686
|
);
|
|
687
687
|
};
|
|
688
688
|
|
|
689
|
-
var renderBlockContent = function renderBlockContent(payload) {
|
|
689
|
+
var renderBlockContent = function renderBlockContent(payload, meta, authorImgHeight) {
|
|
690
690
|
var _payload = payload,
|
|
691
691
|
body = _payload.body;
|
|
692
692
|
|
|
@@ -829,13 +829,24 @@ var Article = function Article(props) {
|
|
|
829
829
|
);
|
|
830
830
|
} else {
|
|
831
831
|
return React.createElement(BlockContent, _extends({
|
|
832
|
-
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, false, null, props.article.Ads, targeting, article),
|
|
832
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, false, null, props.article.Ads, targeting, article, meta, authorPrefix, authorImgHeight),
|
|
833
833
|
blocks: articleBody,
|
|
834
834
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
835
835
|
}, client.config()));
|
|
836
836
|
}
|
|
837
837
|
};
|
|
838
838
|
|
|
839
|
+
var checkIfVideoSeries = function checkIfVideoSeries(article) {
|
|
840
|
+
for (var i = 0; i < article.body.length; i++) {
|
|
841
|
+
var block = article.body[i];
|
|
842
|
+
if (block._type === 'youtubeGallery') {
|
|
843
|
+
return true;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
return false;
|
|
848
|
+
};
|
|
849
|
+
|
|
839
850
|
var detail = function detail() {
|
|
840
851
|
var shareVia = shareOptions.shareVia,
|
|
841
852
|
shareSubject = shareOptions.shareSubject,
|
|
@@ -866,6 +877,8 @@ var Article = function Article(props) {
|
|
|
866
877
|
};
|
|
867
878
|
}
|
|
868
879
|
|
|
880
|
+
var isVideoSeries = checkIfVideoSeries(article);
|
|
881
|
+
|
|
869
882
|
return React.createElement(
|
|
870
883
|
React.Fragment,
|
|
871
884
|
null,
|
|
@@ -888,7 +901,8 @@ var Article = function Article(props) {
|
|
|
888
901
|
React.createElement(
|
|
889
902
|
'div',
|
|
890
903
|
{ className: 'video-detail', style: { marginBottom: isCutomPage(props.article) || showIsi && Array.isArray(isi) && isi.length > 0 ? '15rem' : 0 } },
|
|
891
|
-
|
|
904
|
+
isVideoSeries && renderBlockContent(article, meta, authorImgHeight),
|
|
905
|
+
!isVideoSeries && React.createElement(
|
|
892
906
|
'h1',
|
|
893
907
|
{ className: 'page-title', style: { fontSize: '1.9rem' } },
|
|
894
908
|
title
|
|
@@ -904,7 +918,7 @@ var Article = function Article(props) {
|
|
|
904
918
|
React.createElement(
|
|
905
919
|
'div',
|
|
906
920
|
{ className: 'left-wrap' },
|
|
907
|
-
showPublished && React.createElement(
|
|
921
|
+
!isVideoSeries && showPublished && React.createElement(
|
|
908
922
|
'div',
|
|
909
923
|
null,
|
|
910
924
|
moment(published).format('LL')
|
|
@@ -914,7 +928,7 @@ var Article = function Article(props) {
|
|
|
914
928
|
React.createElement(
|
|
915
929
|
'div',
|
|
916
930
|
{ className: 'mb-3' },
|
|
917
|
-
authorDetails && authorDetails.map(function (authorDetail, index) {
|
|
931
|
+
!isVideoSeries && authorDetails && authorDetails.map(function (authorDetail, index) {
|
|
918
932
|
return React.createElement(
|
|
919
933
|
'span',
|
|
920
934
|
{ key: index },
|
|
@@ -977,7 +991,7 @@ var Article = function Article(props) {
|
|
|
977
991
|
'Page Number: ' + pageNumber
|
|
978
992
|
)
|
|
979
993
|
),
|
|
980
|
-
React.createElement(
|
|
994
|
+
!isVideoSeries && React.createElement(
|
|
981
995
|
'p',
|
|
982
996
|
null,
|
|
983
997
|
React.createElement(SocialShare, {
|
|
@@ -1002,7 +1016,7 @@ var Article = function Article(props) {
|
|
|
1002
1016
|
React.createElement(DocumentGroup, { article: props.article, client: props.client })
|
|
1003
1017
|
)
|
|
1004
1018
|
),
|
|
1005
|
-
summary && React.createElement(
|
|
1019
|
+
!isVideoSeries && summary && React.createElement(
|
|
1006
1020
|
'p',
|
|
1007
1021
|
null,
|
|
1008
1022
|
React.createElement(
|
|
@@ -1036,7 +1050,7 @@ var Article = function Article(props) {
|
|
|
1036
1050
|
React.createElement(
|
|
1037
1051
|
'div',
|
|
1038
1052
|
{ className: 'block-content mt-3' },
|
|
1039
|
-
renderBlockContent(article),
|
|
1053
|
+
!isVideoSeries && renderBlockContent(article, meta),
|
|
1040
1054
|
React.createElement('div', { className: 'clearfix' }),
|
|
1041
1055
|
React.createElement(
|
|
1042
1056
|
'noscript',
|
|
@@ -1484,6 +1498,13 @@ var View = function View(props) {
|
|
|
1484
1498
|
setCurrentPage(0);
|
|
1485
1499
|
}
|
|
1486
1500
|
}, [router]);
|
|
1501
|
+
|
|
1502
|
+
var meta_description = seriesShareOptions && seriesShareOptions.seriesSummary ? '' + seriesShareOptions.seriesSummary + (currentPage > 0 ? ' | Page ' + currentPage : '') : article.seo && article.seo.meta_description ? '' + article.seo.meta_description + (currentPage > 0 ? ' | Page ' + currentPage : '') : shareOptions.shareSummary ? '' + shareOptions.shareSummary + (currentPage > 0 ? ' | Page ' + currentPage : '') : '' + (currentPage > 0 ? 'Page ' + currentPage : '');
|
|
1503
|
+
|
|
1504
|
+
if (isVideoSeries) {
|
|
1505
|
+
meta_description = seriesShareOptions && seriesShareOptions.seriesSummary ? '' + seriesShareOptions.seriesSummary + (currentPage > 0 ? ' | Page ' + currentPage : '') : '';
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1487
1508
|
return React.createElement(
|
|
1488
1509
|
React.Fragment,
|
|
1489
1510
|
null,
|
|
@@ -1493,12 +1514,12 @@ var View = function View(props) {
|
|
|
1493
1514
|
React.createElement(
|
|
1494
1515
|
'title',
|
|
1495
1516
|
{ key: 'title' },
|
|
1496
|
-
seriesShareOptions && seriesShareOptions.seriesTitle ? '' + seriesShareOptions.seriesTitle + (currentPage > 0 ? ' | Page ' + currentPage : '') : article && article.seo && article.seo.seo_title ? '' + article.seo.seo_title + (currentPage > 0 ? ' | Page ' + currentPage : '') : '' + article.title + (currentPage > 0 ? ' | Page ' + currentPage : '')
|
|
1517
|
+
seriesShareOptions && seriesShareOptions.seriesTitle ? '' + seriesShareOptions.seriesTitle + (currentPage > 0 ? ' | Page ' + currentPage : '') : article && article.seo && article.seo.seo_title ? '' + article.seo.seo_title + (currentPage > 0 ? ' | Page ' + currentPage : '') : '' + article.title + (currentPage > 0 ? ' | Page ' + currentPage : '')
|
|
1497
1518
|
),
|
|
1498
1519
|
shareOptions.shareSummary && React.createElement('meta', {
|
|
1499
1520
|
name: 'description',
|
|
1500
1521
|
key: 'description',
|
|
1501
|
-
content:
|
|
1522
|
+
content: meta_description }),
|
|
1502
1523
|
React.createElement('meta', { name: 'keywords', content: getKeywords(article).join(','), key: 'keywords' }),
|
|
1503
1524
|
passwordLock && React.createElement('meta', { name: 'robots', content: 'noindex, nofollow' }),
|
|
1504
1525
|
React.createElement('meta', {
|
|
@@ -1519,7 +1540,7 @@ var View = function View(props) {
|
|
|
1519
1540
|
React.createElement('meta', { property: 'og:site_name', content: props.Settings.title, key: 'og:site_name' }),
|
|
1520
1541
|
React.createElement('meta', {
|
|
1521
1542
|
property: 'og:description',
|
|
1522
|
-
content:
|
|
1543
|
+
content: meta_description,
|
|
1523
1544
|
key: 'og:description'
|
|
1524
1545
|
}),
|
|
1525
1546
|
React.createElement('meta', { name: 'twitter:card', content: 'summary', key: 'twitter:card' }),
|
|
@@ -1536,7 +1557,7 @@ var View = function View(props) {
|
|
|
1536
1557
|
React.createElement('meta', { name: 'twitter:site', content: '@' + props.Settings.title, key: 'twitter:site' }),
|
|
1537
1558
|
React.createElement('meta', {
|
|
1538
1559
|
name: 'twitter:description',
|
|
1539
|
-
content:
|
|
1560
|
+
content: meta_description,
|
|
1540
1561
|
key: 'twitter:description'
|
|
1541
1562
|
}),
|
|
1542
1563
|
canonicalTag && React.createElement('link', {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
export { g as default } from './index-
|
|
2
|
+
export { g as default } from './index-a7f9ce66.js';
|
|
3
3
|
import './BlockContent-d8cd739c.js';
|
|
4
4
|
import './entities-932b50cf.js';
|
|
5
5
|
import './slicedToArray-cdeaee08.js';
|
|
@@ -33,6 +33,9 @@ import './brightcove-react-player-loader.es-b43c695a.js';
|
|
|
33
33
|
import './GroupDeck.js';
|
|
34
34
|
import './smoothscroll-fa4e3f8c.js';
|
|
35
35
|
import './moment-bc12cb97.js';
|
|
36
|
+
import './SocialShare.js';
|
|
37
|
+
import 'next/head';
|
|
38
|
+
import 'react-share';
|
|
36
39
|
import './_object-to-array-8f409e54.js';
|
|
37
40
|
import './toConsumableArray-fa2dcda7.js';
|
|
38
41
|
import 'react-bootstrap/Pagination';
|
|
@@ -42,7 +45,6 @@ import './debounce-1a993acf.js';
|
|
|
42
45
|
import './isSymbol-807e927e.js';
|
|
43
46
|
import 'react-bootstrap/Row';
|
|
44
47
|
import 'react-bootstrap/Col';
|
|
45
|
-
import 'next/head';
|
|
46
48
|
import './inherits-5906fbea.js';
|
|
47
49
|
import './_object-sap-fd3054d0.js';
|
|
48
50
|
import './define-property-ec6d528d.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef, useLayoutEffect, useCallback } from 'react';
|
|
2
2
|
import { _ as _slicedToArray, a as _getIterator } from './slicedToArray-cdeaee08.js';
|
|
3
|
-
import { Carousel, Table, Figure as Figure$1,
|
|
3
|
+
import { Carousel, Table, Figure as Figure$1, Card, Row, Col, Button, ProgressBar } from 'react-bootstrap';
|
|
4
4
|
import { i as imageUrlBuilder } from './index-3f5c03b2.js';
|
|
5
5
|
import { l as lib_3 } from './index-888f9253.js';
|
|
6
6
|
import Router, { useRouter } from 'next/router';
|
|
@@ -18,6 +18,7 @@ import { _ as _typeof$1 } from './typeof-e9cea9e8.js';
|
|
|
18
18
|
import { R as ReactPlayerLoader } from './brightcove-react-player-loader.es-b43c695a.js';
|
|
19
19
|
import GroupDeck from './GroupDeck.js';
|
|
20
20
|
import { m as moment } from './moment-bc12cb97.js';
|
|
21
|
+
import SocialShare from './SocialShare.js';
|
|
21
22
|
import { _ as _export, a as _core } from './_to-object-97770c52.js';
|
|
22
23
|
import { _ as _objectToArray } from './_object-to-array-8f409e54.js';
|
|
23
24
|
import { a as _Array$from, _ as _toConsumableArray } from './toConsumableArray-fa2dcda7.js';
|
|
@@ -25,8 +26,8 @@ import Pagination from 'react-bootstrap/Pagination';
|
|
|
25
26
|
import Button$1 from 'react-bootstrap/Button';
|
|
26
27
|
import { h as html_decode_1 } from './entities-932b50cf.js';
|
|
27
28
|
import DFPAdSlot from './AdSlot.js';
|
|
28
|
-
import Row from 'react-bootstrap/Row';
|
|
29
|
-
import Col from 'react-bootstrap/Col';
|
|
29
|
+
import Row$1 from 'react-bootstrap/Row';
|
|
30
|
+
import Col$1 from 'react-bootstrap/Col';
|
|
30
31
|
import Head from 'next/head';
|
|
31
32
|
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-5906fbea.js';
|
|
32
33
|
import { d as IoIosArrowDropupCircle } from './index.esm-3fdda599.js';
|
|
@@ -2320,12 +2321,12 @@ var Video = function Video(_ref) {
|
|
|
2320
2321
|
accountId: accountIDs.brightcove.accountId,
|
|
2321
2322
|
videoId: videoID,
|
|
2322
2323
|
playerId: accountIDs.brightcove.playerId,
|
|
2323
|
-
attrs: { className: 'brightcove', autoplay: 'muted' }
|
|
2324
|
+
attrs: { className: 'brightcove-fluid', autoplay: 'muted' }
|
|
2324
2325
|
}),
|
|
2325
2326
|
React.createElement(
|
|
2326
2327
|
'style',
|
|
2327
2328
|
{ jsx: 'true' },
|
|
2328
|
-
'\n
|
|
2329
|
+
'\n .brightcove-fluid {\n position: relative;\n padding-bottom: 56.25%; /* 16:9 */\n height: 0;\n width: 100%;\n margin-bottom: 1rem;\n }\n .brightcove-fluid .video-js {\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n '
|
|
2329
2330
|
)
|
|
2330
2331
|
);
|
|
2331
2332
|
} else if (playlistID) {
|
|
@@ -2337,12 +2338,12 @@ var Video = function Video(_ref) {
|
|
|
2337
2338
|
playlistId: playlistID,
|
|
2338
2339
|
playerId: accountIDs.brightcove.playerId,
|
|
2339
2340
|
onSuccess: onVideoSuccess,
|
|
2340
|
-
attrs: { className: 'brightcove brightcove-playlist', autoplay: 'muted' }
|
|
2341
|
+
attrs: { className: 'brightcove-fluid brightcove-playlist', autoplay: 'muted' }
|
|
2341
2342
|
}),
|
|
2342
2343
|
React.createElement(
|
|
2343
2344
|
'style',
|
|
2344
2345
|
{ jsx: 'true' },
|
|
2345
|
-
'\n .brightcove {\n position: relative;\n padding-bottom: 56.25%; /* 16:9 */\n height: 0;\n width: 100%;\n }\n .brightcove .video-js {\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n '
|
|
2346
|
+
'\n .brightcove-fluid {\n position: relative;\n padding-bottom: 56.25%; /* 16:9 */\n height: 0;\n width: 100%;\n margin-bottom: 1rem;\n }\n .brightcove-fluid .video-js {\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n '
|
|
2346
2347
|
)
|
|
2347
2348
|
);
|
|
2348
2349
|
} else if (experienceID) {
|
|
@@ -7058,11 +7059,74 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
7058
7059
|
);
|
|
7059
7060
|
};
|
|
7060
7061
|
|
|
7062
|
+
var renderAuthor = function renderAuthor(authorName, authorURL, index, length) {
|
|
7063
|
+
var defaultUrl = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'authors';
|
|
7064
|
+
var biography = arguments[5];
|
|
7065
|
+
var profileImage = arguments[6];
|
|
7066
|
+
|
|
7067
|
+
if (authorName && authorURL) {
|
|
7068
|
+
return React.createElement(
|
|
7069
|
+
'span',
|
|
7070
|
+
null,
|
|
7071
|
+
React.createElement(
|
|
7072
|
+
'a',
|
|
7073
|
+
{ className: 'author-details-link-' + index, rel: 'author', href: '/' + defaultUrl + '/' + authorURL.current, key: index },
|
|
7074
|
+
authorName
|
|
7075
|
+
),
|
|
7076
|
+
React.createElement(
|
|
7077
|
+
Card,
|
|
7078
|
+
{ className: 'author-details-card-' + index },
|
|
7079
|
+
React.createElement(
|
|
7080
|
+
Row,
|
|
7081
|
+
null,
|
|
7082
|
+
profileImage && React.createElement(
|
|
7083
|
+
Col,
|
|
7084
|
+
{ sm: 12, md: 4, className: 'author-details-img-container' },
|
|
7085
|
+
React.createElement(Card.Img, { className: 'author-details-img', src: profileImage, alt: authorName })
|
|
7086
|
+
),
|
|
7087
|
+
React.createElement(
|
|
7088
|
+
Col,
|
|
7089
|
+
{ className: 'author-details-col', sm: 12, md: profileImage ? 8 : 12 },
|
|
7090
|
+
React.createElement(
|
|
7091
|
+
'div',
|
|
7092
|
+
{ style: { fontWidth: '500', fontSize: '1.15rem' } },
|
|
7093
|
+
authorName
|
|
7094
|
+
),
|
|
7095
|
+
React.createElement(
|
|
7096
|
+
'p',
|
|
7097
|
+
null,
|
|
7098
|
+
biography
|
|
7099
|
+
)
|
|
7100
|
+
)
|
|
7101
|
+
)
|
|
7102
|
+
),
|
|
7103
|
+
React.createElement(
|
|
7104
|
+
'style',
|
|
7105
|
+
{ jsx: 'true' },
|
|
7106
|
+
'\n .author-details-card-' + index + ' {\n display: none;\n position: absolute;\n width: 90%;\n max-width: 450px;\n z-index: 9999;\n }\n .author-details-card-' + index + ' h5 {\n font-weight: 500;\n }\n .author-details-link-' + index + ':hover + .author-details-card-' + index + ', .author-details-card-' + index + ':hover {\n display: block;\n box-shadow: 0px 0px 5px #aaa;\n padding: 15px;\n border-radius: 5px;\n }\n '
|
|
7107
|
+
),
|
|
7108
|
+
length !== index + 1 && ' , '
|
|
7109
|
+
);
|
|
7110
|
+
} else if (authorName) {
|
|
7111
|
+
return React.createElement(
|
|
7112
|
+
'span',
|
|
7113
|
+
{ key: index },
|
|
7114
|
+
authorName,
|
|
7115
|
+
length !== index + 1 && ' , '
|
|
7116
|
+
);
|
|
7117
|
+
}
|
|
7118
|
+
};
|
|
7119
|
+
|
|
7061
7120
|
var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
7062
7121
|
var nodes = _ref.nodes,
|
|
7063
7122
|
client = _ref.client,
|
|
7064
7123
|
getSerializers = _ref.getSerializers,
|
|
7065
|
-
accountIDs = _ref.accountIDs
|
|
7124
|
+
accountIDs = _ref.accountIDs,
|
|
7125
|
+
article = _ref.article,
|
|
7126
|
+
meta = _ref.meta,
|
|
7127
|
+
authorPrefix = _ref.authorPrefix,
|
|
7128
|
+
_ref$authorImgHeight = _ref.authorImgHeight,
|
|
7129
|
+
authorImgHeight = _ref$authorImgHeight === undefined ? 270 : _ref$authorImgHeight;
|
|
7066
7130
|
|
|
7067
7131
|
if (!nodes || !nodes.videos) {
|
|
7068
7132
|
return null;
|
|
@@ -7071,7 +7135,6 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7071
7135
|
var today = moment().utc().format();
|
|
7072
7136
|
|
|
7073
7137
|
var Videos = nodes.videos.filter(function (video) {
|
|
7074
|
-
console.dir(video);
|
|
7075
7138
|
if ((video.is_visible === true || !video.hasOwnProperty('is_visible')) && (today >= video.published || !video.hasOwnProperty('published'))) {
|
|
7076
7139
|
return video;
|
|
7077
7140
|
}
|
|
@@ -7142,7 +7205,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7142
7205
|
// Once component mounts, set the variables
|
|
7143
7206
|
useEffect(function () {
|
|
7144
7207
|
var params = new URL(document.location).searchParams;
|
|
7145
|
-
var seriesVid = params.get('seriesVid') ||
|
|
7208
|
+
var seriesVid = params.get('seriesVid') || 0;
|
|
7146
7209
|
var data = [];
|
|
7147
7210
|
|
|
7148
7211
|
Videos.forEach(function (vid) {
|
|
@@ -7158,7 +7221,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7158
7221
|
});
|
|
7159
7222
|
// if series number doesn't exist, route back to first vid of series
|
|
7160
7223
|
|
|
7161
|
-
if (data.length < seriesVid) {
|
|
7224
|
+
if (data.length < seriesVid || !seriesVid) {
|
|
7162
7225
|
setSeries(1);
|
|
7163
7226
|
setVidUrl(Videos[0].url);
|
|
7164
7227
|
setVidThumbnail(Videos[0].thumbnail && Videos[0].thumbnail.asset ? urlFor(Videos[0].thumbnail.asset).url() : '');
|
|
@@ -7181,17 +7244,17 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7181
7244
|
setData(data);
|
|
7182
7245
|
}, []);
|
|
7183
7246
|
|
|
7184
|
-
useEffect(
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
}, [vidLoaded])
|
|
7247
|
+
// useEffect(() => {
|
|
7248
|
+
// if (vidLoaded == true) {
|
|
7249
|
+
// const params = new URL(document.location).searchParams
|
|
7250
|
+
// const seriesVid = params.get('seriesVid')
|
|
7251
|
+
// const vidTitle = Videos[series - 1].title
|
|
7252
|
+
// const originalTitle = document.title
|
|
7253
|
+
// if (seriesVid) {
|
|
7254
|
+
// document.title = vidTitle + ' | ' + originalTitle
|
|
7255
|
+
// }
|
|
7256
|
+
// }
|
|
7257
|
+
// }, [vidLoaded])
|
|
7195
7258
|
|
|
7196
7259
|
// This function is passed to the GroupDeck to change the youtube iframe src
|
|
7197
7260
|
function setState(url, thumbnail, vidIndex) {
|
|
@@ -7325,6 +7388,65 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7325
7388
|
return React.createElement(
|
|
7326
7389
|
'div',
|
|
7327
7390
|
{ className: 'video-container', style: { marginBottom: '2rem' } },
|
|
7391
|
+
React.createElement(
|
|
7392
|
+
'div',
|
|
7393
|
+
{ className: 'mt-2 mb-5' },
|
|
7394
|
+
series && React.createElement(
|
|
7395
|
+
'div',
|
|
7396
|
+
{ style: { fontSize: '0.9rem' } },
|
|
7397
|
+
article.title,
|
|
7398
|
+
' - Episode ',
|
|
7399
|
+
series
|
|
7400
|
+
),
|
|
7401
|
+
Videos[series - 1] && React.createElement(
|
|
7402
|
+
'h1',
|
|
7403
|
+
{ className: 'mb-3' },
|
|
7404
|
+
Videos[series - 1].title
|
|
7405
|
+
),
|
|
7406
|
+
React.createElement(
|
|
7407
|
+
'div',
|
|
7408
|
+
null,
|
|
7409
|
+
moment(article.published).format('LL')
|
|
7410
|
+
),
|
|
7411
|
+
React.createElement(
|
|
7412
|
+
'div',
|
|
7413
|
+
{ className: 'mb-3' },
|
|
7414
|
+
article.authorDetails && article.authorDetails.map(function (authorDetail, index) {
|
|
7415
|
+
return React.createElement(
|
|
7416
|
+
'span',
|
|
7417
|
+
{ key: index },
|
|
7418
|
+
renderAuthor(authorDetail.displayName, authorDetail.url, index, article.authorDetails.length, authorPrefix, '', authorDetail.profileImage && urlFor(client, authorDetail.profileImage).height(authorImgHeight).url())
|
|
7419
|
+
);
|
|
7420
|
+
})
|
|
7421
|
+
),
|
|
7422
|
+
React.createElement(
|
|
7423
|
+
'p',
|
|
7424
|
+
null,
|
|
7425
|
+
React.createElement(SocialShare, {
|
|
7426
|
+
shareUrl: meta.shareUrl + '?seriesVid=' + series,
|
|
7427
|
+
shareTitle: Videos[series - 1] && Videos[series - 1].title ? Videos[series - 1].title : meta.shareTitle,
|
|
7428
|
+
shareVia: meta.shareVia,
|
|
7429
|
+
shareSummary: Videos[series - 1] && Videos[series - 1].text ? Videos[series - 1].text : meta.shareSummary,
|
|
7430
|
+
shareSubject: meta.shareSubject,
|
|
7431
|
+
shareImage: meta.shareImage,
|
|
7432
|
+
size: 32,
|
|
7433
|
+
siteName: meta.siteName,
|
|
7434
|
+
twitterSiteName: meta.twitterSiteName,
|
|
7435
|
+
disableMeta: true,
|
|
7436
|
+
hidePinterest: meta.hidePinterestShare,
|
|
7437
|
+
hideFacebook: meta.hideFBShare
|
|
7438
|
+
})
|
|
7439
|
+
),
|
|
7440
|
+
Videos[series - 1] && Videos[series - 1].intro && React.createElement(
|
|
7441
|
+
'p',
|
|
7442
|
+
{ className: 'mb-3' },
|
|
7443
|
+
React.createElement(
|
|
7444
|
+
'em',
|
|
7445
|
+
null,
|
|
7446
|
+
Videos[series - 1].intro
|
|
7447
|
+
)
|
|
7448
|
+
)
|
|
7449
|
+
),
|
|
7328
7450
|
React.createElement(
|
|
7329
7451
|
'div',
|
|
7330
7452
|
{ id: 'fluid-video-container', className: 'video-block', style: { position: 'relative', overflow: 'hidden' } },
|
|
@@ -7369,33 +7491,13 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7369
7491
|
React.createElement('div', { className: 'vid-controls', style: { width: '100%', background: 'transparent', display: 'flex', justifyContent: 'center' } }),
|
|
7370
7492
|
React.createElement(
|
|
7371
7493
|
'div',
|
|
7372
|
-
{ className: '
|
|
7373
|
-
series && React.createElement(
|
|
7374
|
-
'h3',
|
|
7375
|
-
null,
|
|
7376
|
-
'Episode ',
|
|
7377
|
-
series
|
|
7378
|
-
),
|
|
7379
|
-
Videos[series - 1] && React.createElement(
|
|
7380
|
-
'h2',
|
|
7381
|
-
{ className: 'mb-3' },
|
|
7382
|
-
Videos[series - 1].title
|
|
7383
|
-
),
|
|
7384
|
-
Videos[series - 1] && Videos[series - 1].intro && React.createElement(
|
|
7385
|
-
'p',
|
|
7386
|
-
{ className: 'mb-3' },
|
|
7387
|
-
React.createElement(
|
|
7388
|
-
'em',
|
|
7389
|
-
null,
|
|
7390
|
-
Videos[series - 1].intro
|
|
7391
|
-
)
|
|
7392
|
-
),
|
|
7494
|
+
{ className: 'vid-text' },
|
|
7393
7495
|
Videos[series - 1] && Videos[series - 1].text && React.createElement(BlockContent, _extends({ serializers: getSerializers, blocks: Videos[series - 1].text, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
|
|
7394
7496
|
),
|
|
7395
7497
|
React.createElement(
|
|
7396
7498
|
'style',
|
|
7397
7499
|
{ jsx: 'true' },
|
|
7398
|
-
'\n
|
|
7500
|
+
'\n span.btn {\n margin: 0 1rem;\n }\n '
|
|
7399
7501
|
)
|
|
7400
7502
|
);
|
|
7401
7503
|
};
|
|
@@ -8156,11 +8258,11 @@ var MultiMedia = function MultiMedia(props) {
|
|
|
8156
8258
|
'div',
|
|
8157
8259
|
{ className: 'multi-media-container' },
|
|
8158
8260
|
React.createElement(
|
|
8159
|
-
Row,
|
|
8261
|
+
Row$1,
|
|
8160
8262
|
{ noGutters: true },
|
|
8161
8263
|
medias.map(function (media) {
|
|
8162
8264
|
return React.createElement(
|
|
8163
|
-
Col,
|
|
8265
|
+
Col$1,
|
|
8164
8266
|
{ xs: 12, md: 12 / medias.length, key: media._key },
|
|
8165
8267
|
React.createElement(
|
|
8166
8268
|
'a',
|
|
@@ -8194,64 +8296,6 @@ var MultiMedia = function MultiMedia(props) {
|
|
|
8194
8296
|
return null;
|
|
8195
8297
|
};
|
|
8196
8298
|
|
|
8197
|
-
var renderAuthor = function renderAuthor(authorName, authorURL, index, length) {
|
|
8198
|
-
var defaultUrl = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'authors';
|
|
8199
|
-
var biography = arguments[5];
|
|
8200
|
-
var profileImage = arguments[6];
|
|
8201
|
-
|
|
8202
|
-
if (authorName && authorURL) {
|
|
8203
|
-
return React.createElement(
|
|
8204
|
-
'span',
|
|
8205
|
-
null,
|
|
8206
|
-
React.createElement(
|
|
8207
|
-
'a',
|
|
8208
|
-
{ className: 'author-details-link-' + index, rel: 'author', href: '/' + defaultUrl + '/' + authorURL.current, key: index },
|
|
8209
|
-
authorName
|
|
8210
|
-
),
|
|
8211
|
-
React.createElement(
|
|
8212
|
-
Card,
|
|
8213
|
-
{ className: 'author-details-card-' + index },
|
|
8214
|
-
React.createElement(
|
|
8215
|
-
Row$1,
|
|
8216
|
-
null,
|
|
8217
|
-
profileImage && React.createElement(
|
|
8218
|
-
Col$1,
|
|
8219
|
-
{ sm: 12, md: 4, className: 'author-details-img-container' },
|
|
8220
|
-
React.createElement(Card.Img, { className: 'author-details-img', src: profileImage, alt: authorName })
|
|
8221
|
-
),
|
|
8222
|
-
React.createElement(
|
|
8223
|
-
Col$1,
|
|
8224
|
-
{ className: 'author-details-col', sm: 12, md: profileImage ? 8 : 12 },
|
|
8225
|
-
React.createElement(
|
|
8226
|
-
'h5',
|
|
8227
|
-
null,
|
|
8228
|
-
authorName
|
|
8229
|
-
),
|
|
8230
|
-
React.createElement(
|
|
8231
|
-
'p',
|
|
8232
|
-
null,
|
|
8233
|
-
biography
|
|
8234
|
-
)
|
|
8235
|
-
)
|
|
8236
|
-
)
|
|
8237
|
-
),
|
|
8238
|
-
React.createElement(
|
|
8239
|
-
'style',
|
|
8240
|
-
{ jsx: 'true' },
|
|
8241
|
-
'\n .author-details-card-' + index + ' {\n display: none;\n position: absolute;\n width: 90%;\n max-width: 450px;\n z-index: 9999;\n }\n .author-details-card-' + index + ' h5 {\n font-weight: 500;\n }\n .author-details-link-' + index + ':hover + .author-details-card-' + index + ', .author-details-card-' + index + ':hover {\n display: block;\n box-shadow: 0px 0px 5px #aaa;\n padding: 15px;\n border-radius: 5px;\n }\n '
|
|
8242
|
-
),
|
|
8243
|
-
length !== index + 1 && ' , '
|
|
8244
|
-
);
|
|
8245
|
-
} else if (authorName) {
|
|
8246
|
-
return React.createElement(
|
|
8247
|
-
'span',
|
|
8248
|
-
{ key: index },
|
|
8249
|
-
authorName,
|
|
8250
|
-
length !== index + 1 && ' , '
|
|
8251
|
-
);
|
|
8252
|
-
}
|
|
8253
|
-
};
|
|
8254
|
-
|
|
8255
8299
|
var InscreenSensor = function (_React$Component) {
|
|
8256
8300
|
_inherits$1(InscreenSensor, _React$Component);
|
|
8257
8301
|
|
|
@@ -9098,11 +9142,11 @@ var MultiFigure = function MultiFigure(props) {
|
|
|
9098
9142
|
'div',
|
|
9099
9143
|
{ className: 'multi-figure-container' },
|
|
9100
9144
|
React.createElement(
|
|
9101
|
-
Row,
|
|
9145
|
+
Row$1,
|
|
9102
9146
|
{ noGutters: true, style: { alignItems: 'center' } },
|
|
9103
9147
|
images.map(function (image, index) {
|
|
9104
9148
|
return React.createElement(
|
|
9105
|
-
Col,
|
|
9149
|
+
Col$1,
|
|
9106
9150
|
{ xs: 12, md: 12 / images.length, key: index },
|
|
9107
9151
|
image.link ? React.createElement(
|
|
9108
9152
|
'a',
|
|
@@ -9229,7 +9273,10 @@ var getSerializers = function getSerializers() {
|
|
|
9229
9273
|
articleId = props[9],
|
|
9230
9274
|
Ads = props[10],
|
|
9231
9275
|
targeting = props[11],
|
|
9232
|
-
article = props[12]
|
|
9276
|
+
article = props[12],
|
|
9277
|
+
meta = props[13],
|
|
9278
|
+
authorPrefix = props[14],
|
|
9279
|
+
authorImgHeight = props[15];
|
|
9233
9280
|
|
|
9234
9281
|
return {
|
|
9235
9282
|
types: {
|
|
@@ -9246,7 +9293,7 @@ var getSerializers = function getSerializers() {
|
|
|
9246
9293
|
youtubeGallery: function youtubeGallery(_ref2) {
|
|
9247
9294
|
var node = _ref2.node;
|
|
9248
9295
|
|
|
9249
|
-
return React.createElement(YouTubeGallery, { nodes: node, accountIDs: videoAccountIDs || {}, client: client, getSerializers: getSerializers(client) });
|
|
9296
|
+
return React.createElement(YouTubeGallery, { nodes: node, article: article, meta: meta, authorPrefix: authorPrefix, authorImgHeight: authorImgHeight, accountIDs: videoAccountIDs || {}, client: client, getSerializers: getSerializers(client) });
|
|
9250
9297
|
},
|
|
9251
9298
|
articleSeries: function articleSeries(_ref3) {
|
|
9252
9299
|
var node = _ref3.node;
|
package/dist/esm/index.js
CHANGED
|
@@ -78,7 +78,7 @@ export { default as VerticalHero } from './VerticalHero.js';
|
|
|
78
78
|
export { default as YahooHero } from './YahooHero.js';
|
|
79
79
|
export { default as GridHero } from './GridHero.js';
|
|
80
80
|
export { default as ConferenceArticleCard } from './ConferenceArticleCard.js';
|
|
81
|
-
export { g as getSerializers } from './index-
|
|
81
|
+
export { g as getSerializers } from './index-a7f9ce66.js';
|
|
82
82
|
export { default as Beam } from './Beam.js';
|
|
83
83
|
export { default as Segment } from './Segment.js';
|
|
84
84
|
export { default as KMTracker } from './KMTracker.js';
|