@mjhls/mjh-framework 1.0.711-beta.0 → 1.0.711-beta.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/dist/cjs/AdSlotsProvider.js +7 -109
- package/dist/cjs/ArticleCarousel.js +2 -1
- package/dist/cjs/ArticleSeriesListing.js +2 -1
- package/dist/cjs/Auth.js +6 -6
- package/dist/cjs/BrowseVideosListing.js +2 -1
- package/dist/cjs/EventsDeck.js +10 -10
- package/dist/cjs/ExternalResources.js +5 -4
- package/dist/cjs/GroupDeck.js +4 -3
- package/dist/cjs/PartnerDetailListing.js +3 -2
- package/dist/cjs/TaxonomyDescription.js +3 -2
- package/dist/cjs/VideoProgramLandingPage.js +247 -0
- package/dist/cjs/VideoSeriesLandingPage.js +177 -0
- package/dist/cjs/VideoSeriesListing.js +2 -1
- package/dist/cjs/View.js +3 -2
- package/dist/cjs/YoutubeGroup.js +4 -3
- package/dist/cjs/getRelatedArticle.js +8 -8
- package/dist/cjs/getSerializers.js +3 -2
- package/dist/cjs/index-187c967e.js +54 -0
- package/dist/cjs/{index-b0cfd1de.js → index-9b8a57e5.js} +5 -5
- package/dist/cjs/index.js +8 -2
- package/dist/cjs/{smoothscroll-95231a70.js → smoothscroll-5054361f.js} +0 -50
- package/dist/esm/AdSlotsProvider.js +9 -111
- package/dist/esm/ArticleCarousel.js +2 -1
- package/dist/esm/ArticleSeriesListing.js +2 -1
- package/dist/esm/BrowseVideosListing.js +2 -1
- package/dist/esm/ExternalResources.js +3 -2
- package/dist/esm/GroupDeck.js +2 -1
- package/dist/esm/PartnerDetailListing.js +3 -2
- package/dist/esm/TaxonomyDescription.js +3 -2
- package/dist/esm/VideoProgramLandingPage.js +242 -0
- package/dist/esm/VideoSeriesLandingPage.js +172 -0
- package/dist/esm/VideoSeriesListing.js +2 -1
- package/dist/esm/View.js +3 -2
- package/dist/esm/YoutubeGroup.js +2 -1
- package/dist/esm/getSerializers.js +3 -2
- package/dist/esm/{index-c6440f6f.js → index-4d1ed4ba.js} +1 -1
- package/dist/esm/index-c7e2ac95.js +52 -0
- package/dist/esm/index.js +6 -2
- package/dist/esm/{smoothscroll-4b699764.js → smoothscroll-0cd4c7a6.js} +2 -51
- package/package.json +1 -1
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
+
|
|
5
|
+
require('./_commonjsHelpers-06173234.js');
|
|
6
|
+
require('./_to-object-329a650b.js');
|
|
7
|
+
require('./es6.string.iterator-cc0bbaa4.js');
|
|
8
|
+
require('./_library-dd23b178.js');
|
|
9
|
+
require('./_iter-detect-60b2f026.js');
|
|
10
|
+
require('./toConsumableArray-9a3476fe.js');
|
|
11
|
+
require('./core.get-iterator-method-f62321d4.js');
|
|
12
|
+
require('./_object-pie-68c5bcbc.js');
|
|
13
|
+
require('./extends-60837c34.js');
|
|
14
|
+
require('./_object-sap-5e74ba08.js');
|
|
15
|
+
require('./inherits-c9f99d47.js');
|
|
16
|
+
require('./define-property-f4d12f4e.js');
|
|
17
|
+
require('./web.dom.iterable-a0e279c1.js');
|
|
18
|
+
var _typeof = require('./typeof-725500bc.js');
|
|
19
|
+
require('./_is-array-754e012d.js');
|
|
20
|
+
var React = require('react');
|
|
21
|
+
var React__default = _interopDefault(React);
|
|
22
|
+
require('./index-8bf6c863.js');
|
|
23
|
+
require('prop-types');
|
|
24
|
+
require('react-bootstrap/Container');
|
|
25
|
+
require('react-bootstrap/Row');
|
|
26
|
+
require('react-bootstrap/Col');
|
|
27
|
+
require('react-bootstrap/Card');
|
|
28
|
+
var moment = require('./moment-575fe24c.js');
|
|
29
|
+
require('next/router');
|
|
30
|
+
require('./isSymbol-04666465.js');
|
|
31
|
+
require('./debounce-eb287781.js');
|
|
32
|
+
require('./index.es-9110add6.js');
|
|
33
|
+
require('react-dom');
|
|
34
|
+
require('./visibility-sensor-0c45a583.js');
|
|
35
|
+
require('./index-be0c82be.js');
|
|
36
|
+
require('./index-da796b8c.js');
|
|
37
|
+
require('./main-02daeefe.js');
|
|
38
|
+
require('./stringify-7c5aff47.js');
|
|
39
|
+
require('./slicedToArray-8f385299.js');
|
|
40
|
+
var asyncToGenerator = require('./asyncToGenerator-533d476a.js');
|
|
41
|
+
require('./_set-species-f92c67c5.js');
|
|
42
|
+
require('./Segment.js');
|
|
43
|
+
require('./Beam.js');
|
|
44
|
+
require('./AdSlot.js');
|
|
45
|
+
require('./ADInfeed-5a561d7c.js');
|
|
46
|
+
require('./lodash-fc2922d0.js');
|
|
47
|
+
require('./ADlgInfeed-c50f81d4.js');
|
|
48
|
+
var index$3 = require('./index-187c967e.js');
|
|
49
|
+
var MasterDeck = require('./MasterDeck.js');
|
|
50
|
+
require('react-bootstrap/Breadcrumb');
|
|
51
|
+
var Breadcrumbs = require('./Breadcrumbs.js');
|
|
52
|
+
require('./style-inject.es-dcee06b6.js');
|
|
53
|
+
var VideoSeriesCard = require('./VideoSeriesCard.js');
|
|
54
|
+
|
|
55
|
+
var _this = undefined;
|
|
56
|
+
|
|
57
|
+
var VideoSeriesLandingPage = function VideoSeriesLandingPage(props) {
|
|
58
|
+
var summary = props.summary,
|
|
59
|
+
client = props.client,
|
|
60
|
+
posts = props.posts,
|
|
61
|
+
_props$variant = props.variant,
|
|
62
|
+
variant = _props$variant === undefined ? 'left' : _props$variant,
|
|
63
|
+
_props$defaultImage = props.defaultImage,
|
|
64
|
+
defaultImage = _props$defaultImage === undefined ? '/placeholder.jpg' : _props$defaultImage,
|
|
65
|
+
mapping = props.mapping,
|
|
66
|
+
query = props.query,
|
|
67
|
+
params = props.params,
|
|
68
|
+
_props$currentPage = props.currentPage,
|
|
69
|
+
currentPage = _props$currentPage === undefined ? 1 : _props$currentPage,
|
|
70
|
+
pageview = props.pageview,
|
|
71
|
+
_props$autoScroll = props.autoScroll,
|
|
72
|
+
autoScroll = _props$autoScroll === undefined ? true : _props$autoScroll,
|
|
73
|
+
rightItems = props.rightItems,
|
|
74
|
+
brandInsightAd = props.brandInsightAd,
|
|
75
|
+
_props$showBI = props.showBI,
|
|
76
|
+
showBI = _props$showBI === undefined ? false : _props$showBI,
|
|
77
|
+
_props$lgInfeedAd = props.lgInfeedAd,
|
|
78
|
+
lgInfeedAd = _props$lgInfeedAd === undefined ? false : _props$lgInfeedAd;
|
|
79
|
+
|
|
80
|
+
return React__default.createElement(
|
|
81
|
+
'div',
|
|
82
|
+
null,
|
|
83
|
+
summary && React__default.createElement(
|
|
84
|
+
'div',
|
|
85
|
+
{ style: { fontSize: '1rem' }, className: 'series-summary px-1 my-4' },
|
|
86
|
+
summary
|
|
87
|
+
),
|
|
88
|
+
React__default.createElement(Breadcrumbs, null),
|
|
89
|
+
posts && React__default.createElement(MasterDeck, {
|
|
90
|
+
deck: VideoSeriesCard,
|
|
91
|
+
variant: variant,
|
|
92
|
+
client: client,
|
|
93
|
+
defaultImage: defaultImage,
|
|
94
|
+
mapping: mapping,
|
|
95
|
+
dataRecord: posts,
|
|
96
|
+
query: query,
|
|
97
|
+
params: params,
|
|
98
|
+
currentPage: currentPage,
|
|
99
|
+
pageview: pageview,
|
|
100
|
+
autoScroll: autoScroll,
|
|
101
|
+
rightItems: rightItems,
|
|
102
|
+
brandInsightAd: brandInsightAd,
|
|
103
|
+
showBI: showBI,
|
|
104
|
+
lgInfeedAd: lgInfeedAd
|
|
105
|
+
})
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
VideoSeriesLandingPage.getInitialData = function () {
|
|
110
|
+
var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(context, client) {
|
|
111
|
+
var itemsPerPage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
|
|
112
|
+
var today, urlQuery, seriesName, currentPage, start, params, query, posts, seriesTitle, summary, url;
|
|
113
|
+
return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
|
|
114
|
+
while (1) {
|
|
115
|
+
switch (_context.prev = _context.next) {
|
|
116
|
+
case 0:
|
|
117
|
+
today = moment.moment().utc().format();
|
|
118
|
+
urlQuery = context.query;
|
|
119
|
+
seriesName = urlQuery.series;
|
|
120
|
+
currentPage = urlQuery.page ? parseInt(urlQuery.page) : 1;
|
|
121
|
+
start = (currentPage - 1) * itemsPerPage;
|
|
122
|
+
params = {
|
|
123
|
+
from: start,
|
|
124
|
+
to: start + itemsPerPage,
|
|
125
|
+
itemsPerPage: itemsPerPage
|
|
126
|
+
};
|
|
127
|
+
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && dateTime(published) <= dateTime(now()) \n && references(\'02c6c999-e6fe-4275-98ca-ceef28f91e14\') \n && is_visible == true \n && url.current == \'' + seriesName + '\'\n ][$from...$to] | order(published desc) {\n\t\ttitle,\n\t\tsummary,\n\t\tpublished,\n\t\tthumbnail,\n\t\turl,\n\t\ttaxonomy,\n\t\tbody[_type == "youtubeGallery"]\n\t}';
|
|
128
|
+
_context.next = 9;
|
|
129
|
+
return client.fetch(query, params);
|
|
130
|
+
|
|
131
|
+
case 9:
|
|
132
|
+
posts = _context.sent;
|
|
133
|
+
seriesTitle = '';
|
|
134
|
+
summary = '';
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
if (posts.length > 0 && posts[0].body.length > 0 && posts[0].body[0].videos) {
|
|
138
|
+
url = posts[0].url.current + '?seriesVid=';
|
|
139
|
+
|
|
140
|
+
seriesTitle = posts[0].title;
|
|
141
|
+
summary = posts[0].summary;
|
|
142
|
+
posts = posts[0].body[0].videos.filter(function (video) {
|
|
143
|
+
if ((video.is_visible === true || !video.hasOwnProperty('is_visible')) && (today >= video.published || !video.hasOwnProperty('published'))) {
|
|
144
|
+
return video;
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
//start youtube thumbnail fix
|
|
148
|
+
posts.map(function (post, index) {
|
|
149
|
+
if (post.thumbnail && _typeof._typeof(post.thumbnail) !== 'object' || !post.thumbnail) {
|
|
150
|
+
var id = index$3.getYoutubeId(post.url);
|
|
151
|
+
var imageURL = 'https://img.youtube.com/vi/' + id + '/hqdefault.jpg';
|
|
152
|
+
return post['thumbnail'] = imageURL, post['url'] = {
|
|
153
|
+
current: url + (index + 1)
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
return post['url'] = {
|
|
157
|
+
current: url + (index + 1)
|
|
158
|
+
};
|
|
159
|
+
});
|
|
160
|
+
//end
|
|
161
|
+
}
|
|
162
|
+
return _context.abrupt('return', { posts: posts, query: query, params: params, seriesTitle: seriesTitle, summary: summary, seriesName: seriesName });
|
|
163
|
+
|
|
164
|
+
case 14:
|
|
165
|
+
case 'end':
|
|
166
|
+
return _context.stop();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}, _callee, _this);
|
|
170
|
+
}));
|
|
171
|
+
|
|
172
|
+
return function (_x, _x2) {
|
|
173
|
+
return _ref.apply(this, arguments);
|
|
174
|
+
};
|
|
175
|
+
}();
|
|
176
|
+
|
|
177
|
+
module.exports = VideoSeriesLandingPage;
|
|
@@ -32,7 +32,8 @@ require('./index-be0c82be.js');
|
|
|
32
32
|
require('./index-da796b8c.js');
|
|
33
33
|
require('./main-02daeefe.js');
|
|
34
34
|
require('./slicedToArray-8f385299.js');
|
|
35
|
-
require('./
|
|
35
|
+
require('./index-187c967e.js');
|
|
36
|
+
require('./smoothscroll-5054361f.js');
|
|
36
37
|
var YoutubeGroup = require('./YoutubeGroup.js');
|
|
37
38
|
require('./iconBase-68959171.js');
|
|
38
39
|
var index_esm = require('./index.esm-90433435.js');
|
package/dist/cjs/View.js
CHANGED
|
@@ -42,14 +42,15 @@ require('./Segment.js');
|
|
|
42
42
|
require('./Beam.js');
|
|
43
43
|
var AdSlot = require('./AdSlot.js');
|
|
44
44
|
var BlockContent = require('./BlockContent-091a991f.js');
|
|
45
|
-
require('./
|
|
45
|
+
require('./index-187c967e.js');
|
|
46
|
+
require('./smoothscroll-5054361f.js');
|
|
46
47
|
require('./GroupDeck.js');
|
|
47
48
|
require('react-bootstrap');
|
|
48
49
|
require('./iconBase-68959171.js');
|
|
49
50
|
require('./index.esm-90433435.js');
|
|
50
51
|
var Button = _interopDefault(require('react-bootstrap/Button'));
|
|
51
52
|
var Form = _interopDefault(require('react-bootstrap/Form'));
|
|
52
|
-
var getSerializers = require('./index-
|
|
53
|
+
var getSerializers = require('./index-9b8a57e5.js');
|
|
53
54
|
require('./util-f2c1b65b.js');
|
|
54
55
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
55
56
|
require('react-bootstrap/Pagination');
|
package/dist/cjs/YoutubeGroup.js
CHANGED
|
@@ -19,7 +19,8 @@ var index$1 = require('./index-be0c82be.js');
|
|
|
19
19
|
var index$2 = require('./index-da796b8c.js');
|
|
20
20
|
var main = require('./main-02daeefe.js');
|
|
21
21
|
var slicedToArray = require('./slicedToArray-8f385299.js');
|
|
22
|
-
var
|
|
22
|
+
var index$3 = require('./index-187c967e.js');
|
|
23
|
+
var smoothscroll = require('./smoothscroll-5054361f.js');
|
|
23
24
|
|
|
24
25
|
/*
|
|
25
26
|
GROQ query -
|
|
@@ -254,7 +255,7 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
254
255
|
} else if (_typeof._typeof(video.thumbnail == 'string')) {
|
|
255
256
|
thumbnail = video.thumbnail;
|
|
256
257
|
} else {
|
|
257
|
-
thumbnail = 'https://img.youtube.com/vi/' +
|
|
258
|
+
thumbnail = 'https://img.youtube.com/vi/' + index$3.getYoutubeId(video.url) + '/hqdefault.jpg';
|
|
258
259
|
}
|
|
259
260
|
|
|
260
261
|
return React__default.createElement(
|
|
@@ -307,7 +308,7 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
307
308
|
if (video.thumbnail && video.thumbnail.asset) {
|
|
308
309
|
_thumbnail = urlFor(video.thumbnail, props.client);
|
|
309
310
|
} else {
|
|
310
|
-
_thumbnail = 'https://img.youtube.com/vi/' +
|
|
311
|
+
_thumbnail = 'https://img.youtube.com/vi/' + index$3.getYoutubeId(video.url) + '/hqdefault.jpg';
|
|
311
312
|
}
|
|
312
313
|
return React__default.createElement(
|
|
313
314
|
'div',
|
|
@@ -9,7 +9,7 @@ require('./core.get-iterator-method-f62321d4.js');
|
|
|
9
9
|
require('./web.dom.iterable-a0e279c1.js');
|
|
10
10
|
var asyncToGenerator = require('./asyncToGenerator-533d476a.js');
|
|
11
11
|
require('./_set-species-f92c67c5.js');
|
|
12
|
-
var index$
|
|
12
|
+
var index$5 = require('./index-bd6c9f56.js');
|
|
13
13
|
var getQuery = require('./getQuery.js');
|
|
14
14
|
|
|
15
15
|
var defaultParseOptions = {
|
|
@@ -278,10 +278,10 @@ function createCookie(name, value, options) {
|
|
|
278
278
|
*/
|
|
279
279
|
function parseCookies(ctx, options) {
|
|
280
280
|
if (ctx && ctx.req && ctx.req.headers && ctx.req.headers.cookie) {
|
|
281
|
-
return index$
|
|
281
|
+
return index$5.cookie.parse(ctx.req.headers.cookie, options);
|
|
282
282
|
}
|
|
283
283
|
if (isBrowser()) {
|
|
284
|
-
return index$
|
|
284
|
+
return index$5.cookie.parse(document.cookie, options);
|
|
285
285
|
}
|
|
286
286
|
return {};
|
|
287
287
|
}
|
|
@@ -306,10 +306,10 @@ function setCookie$1(ctx, name, value, options) {
|
|
|
306
306
|
var cookiesToSet_1 = [];
|
|
307
307
|
parsedCookies.forEach(function (parsedCookie) {
|
|
308
308
|
if (!areCookiesEqual(parsedCookie, createCookie(name, value, options))) {
|
|
309
|
-
cookiesToSet_1.push(index$
|
|
309
|
+
cookiesToSet_1.push(index$5.cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({}, parsedCookie)));
|
|
310
310
|
}
|
|
311
311
|
});
|
|
312
|
-
cookiesToSet_1.push(index$
|
|
312
|
+
cookiesToSet_1.push(index$5.cookie.serialize(name, value, options));
|
|
313
313
|
if (!ctx.res.finished) {
|
|
314
314
|
ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
|
|
315
315
|
}
|
|
@@ -318,7 +318,7 @@ function setCookie$1(ctx, name, value, options) {
|
|
|
318
318
|
if (options && options.httpOnly) {
|
|
319
319
|
throw new Error('Can not set a httpOnly cookie in the browser.');
|
|
320
320
|
}
|
|
321
|
-
document.cookie = index$
|
|
321
|
+
document.cookie = index$5.cookie.serialize(name, value, options);
|
|
322
322
|
}
|
|
323
323
|
return {};
|
|
324
324
|
}
|
|
@@ -339,11 +339,11 @@ function destroyCookie(ctx, name, options) {
|
|
|
339
339
|
cookies = [cookies];
|
|
340
340
|
if (typeof cookies === 'number')
|
|
341
341
|
cookies = [];
|
|
342
|
-
cookies.push(index$
|
|
342
|
+
cookies.push(index$5.cookie.serialize(name, '', opts));
|
|
343
343
|
ctx.res.setHeader('Set-Cookie', cookies);
|
|
344
344
|
}
|
|
345
345
|
if (isBrowser()) {
|
|
346
|
-
document.cookie = index$
|
|
346
|
+
document.cookie = index$5.cookie.serialize(name, '', opts);
|
|
347
347
|
}
|
|
348
348
|
return {};
|
|
349
349
|
}
|
|
@@ -37,13 +37,14 @@ require('./Segment.js');
|
|
|
37
37
|
require('./Beam.js');
|
|
38
38
|
require('./AdSlot.js');
|
|
39
39
|
require('./BlockContent-091a991f.js');
|
|
40
|
-
require('./
|
|
40
|
+
require('./index-187c967e.js');
|
|
41
|
+
require('./smoothscroll-5054361f.js');
|
|
41
42
|
require('./GroupDeck.js');
|
|
42
43
|
require('react-bootstrap');
|
|
43
44
|
require('./iconBase-68959171.js');
|
|
44
45
|
require('./index.esm-90433435.js');
|
|
45
46
|
require('react-bootstrap/Button');
|
|
46
|
-
var getSerializers = require('./index-
|
|
47
|
+
var getSerializers = require('./index-9b8a57e5.js');
|
|
47
48
|
require('./util-f2c1b65b.js');
|
|
48
49
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
49
50
|
require('react-bootstrap/Pagination');
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
4
|
+
|
|
5
|
+
var getYoutubeId = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
6
|
+
(function (root, factory) {
|
|
7
|
+
{
|
|
8
|
+
module.exports = factory();
|
|
9
|
+
}
|
|
10
|
+
}(_commonjsHelpers.commonjsGlobal, function (exports) {
|
|
11
|
+
|
|
12
|
+
return function (url, opts) {
|
|
13
|
+
if (opts == undefined) {
|
|
14
|
+
opts = {fuzzy: true};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (/youtu\.?be/.test(url)) {
|
|
18
|
+
|
|
19
|
+
// Look first for known patterns
|
|
20
|
+
var i;
|
|
21
|
+
var patterns = [
|
|
22
|
+
/youtu\.be\/([^#\&\?]{11})/, // youtu.be/<id>
|
|
23
|
+
/\?v=([^#\&\?]{11})/, // ?v=<id>
|
|
24
|
+
/\&v=([^#\&\?]{11})/, // &v=<id>
|
|
25
|
+
/embed\/([^#\&\?]{11})/, // embed/<id>
|
|
26
|
+
/\/v\/([^#\&\?]{11})/ // /v/<id>
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
// If any pattern matches, return the ID
|
|
30
|
+
for (i = 0; i < patterns.length; ++i) {
|
|
31
|
+
if (patterns[i].test(url)) {
|
|
32
|
+
return patterns[i].exec(url)[1];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (opts.fuzzy) {
|
|
37
|
+
// If that fails, break it apart by certain characters and look
|
|
38
|
+
// for the 11 character key
|
|
39
|
+
var tokens = url.split(/[\/\&\?=#\.\s]/g);
|
|
40
|
+
for (i = 0; i < tokens.length; ++i) {
|
|
41
|
+
if (/^[^#\&\?]{11}$/.test(tokens[i])) {
|
|
42
|
+
return tokens[i];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return null;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
}));
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
exports.getYoutubeId = getYoutubeId;
|
|
@@ -26,7 +26,7 @@ var Segment = require('./Segment.js');
|
|
|
26
26
|
var Beam = require('./Beam.js');
|
|
27
27
|
var AdSlot = require('./AdSlot.js');
|
|
28
28
|
var BlockContent = require('./BlockContent-091a991f.js');
|
|
29
|
-
var
|
|
29
|
+
var index$3 = require('./index-187c967e.js');
|
|
30
30
|
var GroupDeck = require('./GroupDeck.js');
|
|
31
31
|
var reactBootstrap = require('react-bootstrap');
|
|
32
32
|
var index_esm = require('./index.esm-90433435.js');
|
|
@@ -1922,7 +1922,7 @@ YouTube.PlayerState = {
|
|
|
1922
1922
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
1923
1923
|
var url = _ref.url;
|
|
1924
1924
|
|
|
1925
|
-
var id =
|
|
1925
|
+
var id = index$3.getYoutubeId(url);
|
|
1926
1926
|
|
|
1927
1927
|
var _useState = React.useState(false),
|
|
1928
1928
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
@@ -7138,7 +7138,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7138
7138
|
if (vid.thumbnail && vid.thumbnail.asset) {
|
|
7139
7139
|
data.push({ title: vid.title, thumbnail: urlFor(vid.thumbnail.asset).url(), url: vid.url });
|
|
7140
7140
|
} else {
|
|
7141
|
-
data.push({ title: vid.title, thumbnail: 'https://img.youtube.com/vi/' +
|
|
7141
|
+
data.push({ title: vid.title, thumbnail: 'https://img.youtube.com/vi/' + index$3.getYoutubeId(vid.url) + '/hqdefault.jpg', url: vid.url });
|
|
7142
7142
|
}
|
|
7143
7143
|
}
|
|
7144
7144
|
});
|
|
@@ -7198,7 +7198,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7198
7198
|
//Small pause before starting next video
|
|
7199
7199
|
setTimeout(function () {
|
|
7200
7200
|
//Youtube API to start video playing automatically
|
|
7201
|
-
var id =
|
|
7201
|
+
var id = index$3.getYoutubeId(vidUrl);
|
|
7202
7202
|
event.target.loadVideoById(id);
|
|
7203
7203
|
}, 1500);
|
|
7204
7204
|
};
|
|
@@ -7316,7 +7316,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7316
7316
|
{ id: 'fluid-video-container', className: 'video-block', style: { position: 'relative', overflow: 'hidden' } },
|
|
7317
7317
|
vidUrl && vidType == 'youtube' && React__default.createElement(YouTube, {
|
|
7318
7318
|
className: 'fluid-iframe',
|
|
7319
|
-
videoId:
|
|
7319
|
+
videoId: index$3.getYoutubeId(vidUrl),
|
|
7320
7320
|
opts: opts,
|
|
7321
7321
|
onReady: handleOnReady,
|
|
7322
7322
|
onPlay: handleOnPlay,
|
package/dist/cjs/index.js
CHANGED
|
@@ -58,7 +58,8 @@ require('./BlockContent-091a991f.js');
|
|
|
58
58
|
require('./react-social-icons-f7f48f71.js');
|
|
59
59
|
var TaxonomyCard = require('./TaxonomyCard.js');
|
|
60
60
|
var RolesDeck = require('./RolesDeck.js');
|
|
61
|
-
require('./
|
|
61
|
+
require('./index-187c967e.js');
|
|
62
|
+
require('./smoothscroll-5054361f.js');
|
|
62
63
|
var GroupDeck = require('./GroupDeck.js');
|
|
63
64
|
var YoutubeGroup = require('./YoutubeGroup.js');
|
|
64
65
|
require('react-bootstrap');
|
|
@@ -83,7 +84,7 @@ require('react-bootstrap/Form');
|
|
|
83
84
|
require('./index-3294d3bc.js');
|
|
84
85
|
require('./js.cookie-a511c430.js');
|
|
85
86
|
var CMEDeck = require('./CMEDeck.js');
|
|
86
|
-
var getSerializers = require('./index-
|
|
87
|
+
var getSerializers = require('./index-9b8a57e5.js');
|
|
87
88
|
require('./util-f2c1b65b.js');
|
|
88
89
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
89
90
|
require('react-bootstrap/Pagination');
|
|
@@ -177,6 +178,9 @@ var urlFor = require('./urlFor.js');
|
|
|
177
178
|
require('./style-inject.es-dcee06b6.js');
|
|
178
179
|
require('react-twitter-embed');
|
|
179
180
|
var PartnerDetailListing = require('./PartnerDetailListing.js');
|
|
181
|
+
var VideoProgramLandingPage = require('./VideoProgramLandingPage.js');
|
|
182
|
+
require('./VideoSeriesCard.js');
|
|
183
|
+
var VideoSeriesLandingPage = require('./VideoSeriesLandingPage.js');
|
|
180
184
|
|
|
181
185
|
|
|
182
186
|
|
|
@@ -266,3 +270,5 @@ exports.View = View;
|
|
|
266
270
|
exports.getKeywords = getKeywords;
|
|
267
271
|
exports.urlFor = urlFor;
|
|
268
272
|
exports.PartnerDetailListing = PartnerDetailListing;
|
|
273
|
+
exports.VideoProgramLandingPage = VideoProgramLandingPage;
|
|
274
|
+
exports.VideoSeriesLandingPage = VideoSeriesLandingPage;
|
|
@@ -2,55 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
4
4
|
|
|
5
|
-
var getYoutubeId = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
6
|
-
(function (root, factory) {
|
|
7
|
-
{
|
|
8
|
-
module.exports = factory();
|
|
9
|
-
}
|
|
10
|
-
}(_commonjsHelpers.commonjsGlobal, function (exports) {
|
|
11
|
-
|
|
12
|
-
return function (url, opts) {
|
|
13
|
-
if (opts == undefined) {
|
|
14
|
-
opts = {fuzzy: true};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
if (/youtu\.?be/.test(url)) {
|
|
18
|
-
|
|
19
|
-
// Look first for known patterns
|
|
20
|
-
var i;
|
|
21
|
-
var patterns = [
|
|
22
|
-
/youtu\.be\/([^#\&\?]{11})/, // youtu.be/<id>
|
|
23
|
-
/\?v=([^#\&\?]{11})/, // ?v=<id>
|
|
24
|
-
/\&v=([^#\&\?]{11})/, // &v=<id>
|
|
25
|
-
/embed\/([^#\&\?]{11})/, // embed/<id>
|
|
26
|
-
/\/v\/([^#\&\?]{11})/ // /v/<id>
|
|
27
|
-
];
|
|
28
|
-
|
|
29
|
-
// If any pattern matches, return the ID
|
|
30
|
-
for (i = 0; i < patterns.length; ++i) {
|
|
31
|
-
if (patterns[i].test(url)) {
|
|
32
|
-
return patterns[i].exec(url)[1];
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (opts.fuzzy) {
|
|
37
|
-
// If that fails, break it apart by certain characters and look
|
|
38
|
-
// for the 11 character key
|
|
39
|
-
var tokens = url.split(/[\/\&\?=#\.\s]/g);
|
|
40
|
-
for (i = 0; i < tokens.length; ++i) {
|
|
41
|
-
if (/^[^#\&\?]{11}$/.test(tokens[i])) {
|
|
42
|
-
return tokens[i];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return null;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
}));
|
|
52
|
-
});
|
|
53
|
-
|
|
54
5
|
var smoothscroll = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
55
6
|
/* smoothscroll v0.4.4 - 2019 - Dustan Kasten, Jeremias Menichelli - MIT License */
|
|
56
7
|
(function () {
|
|
@@ -484,5 +435,4 @@ var smoothscroll = _commonjsHelpers.createCommonjsModule(function (module, expor
|
|
|
484
435
|
});
|
|
485
436
|
var smoothscroll_1 = smoothscroll.polyfill;
|
|
486
437
|
|
|
487
|
-
exports.getYoutubeId = getYoutubeId;
|
|
488
438
|
exports.smoothscroll = smoothscroll;
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import './_to-object-ded78eb9.js';
|
|
3
|
-
import './es6.string.iterator-9b2af4a5.js';
|
|
4
|
-
import './_library-528f1934.js';
|
|
5
|
-
import './_iter-detect-59409a32.js';
|
|
6
|
-
import { _ as _toConsumableArray } from './toConsumableArray-725434a0.js';
|
|
7
|
-
import './core.get-iterator-method-54d2e411.js';
|
|
8
|
-
import './web.dom.iterable-8956f9a5.js';
|
|
9
2
|
import React__default, { useEffect } from 'react';
|
|
10
|
-
import {
|
|
3
|
+
import { b as lib_1, l as lib_3 } from './index-a9e53f80.js';
|
|
11
4
|
import 'prop-types';
|
|
12
|
-
import { e as main_22
|
|
13
|
-
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7c654f36.js';
|
|
14
|
-
import './_set-species-cede29f8.js';
|
|
15
|
-
|
|
16
|
-
var _this = undefined;
|
|
5
|
+
import { e as main_22 } from './main-e4a934b2.js';
|
|
17
6
|
|
|
18
7
|
var AdSlotsProvider = function AdSlotsProvider(_ref) {
|
|
19
8
|
var children = _ref.children,
|
|
@@ -23,109 +12,18 @@ var AdSlotsProvider = function AdSlotsProvider(_ref) {
|
|
|
23
12
|
_ref$singleRequest = _ref.singleRequest,
|
|
24
13
|
singleRequest = _ref$singleRequest === undefined ? true : _ref$singleRequest,
|
|
25
14
|
_ref$autoRefresh = _ref.autoRefresh,
|
|
26
|
-
autoRefresh = _ref$autoRefresh === undefined ?
|
|
27
|
-
_ref$refreshADs = _ref.refreshADs,
|
|
28
|
-
refreshADs = _ref$refreshADs === undefined ? {} : _ref$refreshADs;
|
|
15
|
+
autoRefresh = _ref$autoRefresh === undefined ? false : _ref$autoRefresh;
|
|
29
16
|
|
|
30
17
|
useEffect(function () {
|
|
31
|
-
// Refresh ADs after every one minute
|
|
32
|
-
var generateAdsToRefresh = function () {
|
|
33
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(ads) {
|
|
34
|
-
var googletag, slots, domAds, adsToRefresh;
|
|
35
|
-
return regenerator.wrap(function _callee$(_context) {
|
|
36
|
-
while (1) {
|
|
37
|
-
switch (_context.prev = _context.next) {
|
|
38
|
-
case 0:
|
|
39
|
-
_context.next = 2;
|
|
40
|
-
return lib_3.getGoogletag();
|
|
41
|
-
|
|
42
|
-
case 2:
|
|
43
|
-
googletag = _context.sent;
|
|
44
|
-
|
|
45
|
-
if (!(googletag && googletag.pubadsReady)) {
|
|
46
|
-
_context.next = 8;
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
slots = googletag.pubads().getSlots();
|
|
51
|
-
domAds = slots.map(function (slot) {
|
|
52
|
-
return slot.getSlotId().getDomId();
|
|
53
|
-
});
|
|
54
|
-
adsToRefresh = domAds.reduce(function (acc, item) {
|
|
55
|
-
ads.forEach(function (ad) {
|
|
56
|
-
if (item.includes(ad)) {
|
|
57
|
-
acc = [].concat(_toConsumableArray(acc), [item]);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
return acc;
|
|
61
|
-
}, []);
|
|
62
|
-
return _context.abrupt('return', adsToRefresh);
|
|
63
|
-
|
|
64
|
-
case 8:
|
|
65
|
-
return _context.abrupt('return', ads);
|
|
66
|
-
|
|
67
|
-
case 9:
|
|
68
|
-
case 'end':
|
|
69
|
-
return _context.stop();
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}, _callee, _this);
|
|
73
|
-
}));
|
|
74
|
-
|
|
75
|
-
return function generateAdsToRefresh(_x) {
|
|
76
|
-
return _ref2.apply(this, arguments);
|
|
77
|
-
};
|
|
78
|
-
}();
|
|
18
|
+
// Refresh ADs after every one minute of user not scrolled
|
|
79
19
|
var isScrolling = void 0;
|
|
80
20
|
var refreshADsAfterInterval = function refreshADsAfterInterval() {
|
|
81
|
-
isScrolling = setInterval(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return regenerator.wrap(function _callee2$(_context2) {
|
|
85
|
-
while (1) {
|
|
86
|
-
switch (_context2.prev = _context2.next) {
|
|
87
|
-
case 0:
|
|
88
|
-
_refreshADs$mobileAds = refreshADs.mobileAds, mobileAds = _refreshADs$mobileAds === undefined ? ['leaderboard-ad'] : _refreshADs$mobileAds, _refreshADs$desktopAd = refreshADs.desktopAds, desktopAds = _refreshADs$desktopAd === undefined ? [] : _refreshADs$desktopAd;
|
|
89
|
-
ads = [];
|
|
90
|
-
|
|
91
|
-
if (!main_36) {
|
|
92
|
-
_context2.next = 8;
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
_context2.next = 5;
|
|
97
|
-
return generateAdsToRefresh(mobileAds);
|
|
98
|
-
|
|
99
|
-
case 5:
|
|
100
|
-
ads = _context2.sent;
|
|
101
|
-
_context2.next = 12;
|
|
102
|
-
break;
|
|
103
|
-
|
|
104
|
-
case 8:
|
|
105
|
-
if (!main_22) {
|
|
106
|
-
_context2.next = 12;
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
_context2.next = 11;
|
|
111
|
-
return generateAdsToRefresh(desktopAds);
|
|
112
|
-
|
|
113
|
-
case 11:
|
|
114
|
-
ads = _context2.sent;
|
|
115
|
-
|
|
116
|
-
case 12:
|
|
117
|
-
lib_3.refresh.apply(lib_3, _toConsumableArray(ads));
|
|
118
|
-
|
|
119
|
-
case 13:
|
|
120
|
-
case 'end':
|
|
121
|
-
return _context2.stop();
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}, _callee2, _this);
|
|
125
|
-
})), 60000);
|
|
21
|
+
isScrolling = setInterval(function () {
|
|
22
|
+
lib_3.refresh();
|
|
23
|
+
}, 60000);
|
|
126
24
|
};
|
|
127
|
-
autoRefresh && refreshADsAfterInterval();
|
|
128
|
-
autoRefresh && window.addEventListener('scroll', function () {
|
|
25
|
+
autoRefresh && main_22 && refreshADsAfterInterval();
|
|
26
|
+
autoRefresh && main_22 && window.addEventListener('scroll', function () {
|
|
129
27
|
clearInterval(isScrolling);
|
|
130
28
|
refreshADsAfterInterval();
|
|
131
29
|
}, false);
|
|
@@ -15,7 +15,8 @@ import './index-73819142.js';
|
|
|
15
15
|
import './index-5f9f807a.js';
|
|
16
16
|
import './main-e4a934b2.js';
|
|
17
17
|
import './slicedToArray-7021e5df.js';
|
|
18
|
-
import './
|
|
18
|
+
import './index-c7e2ac95.js';
|
|
19
|
+
import './smoothscroll-0cd4c7a6.js';
|
|
19
20
|
import YoutubeGroup from './YoutubeGroup.js';
|
|
20
21
|
|
|
21
22
|
function ArticleCarousel(props) {
|
|
@@ -26,7 +26,8 @@ import './index-73819142.js';
|
|
|
26
26
|
import './index-5f9f807a.js';
|
|
27
27
|
import './main-e4a934b2.js';
|
|
28
28
|
import './slicedToArray-7021e5df.js';
|
|
29
|
-
import './
|
|
29
|
+
import './index-c7e2ac95.js';
|
|
30
|
+
import './smoothscroll-0cd4c7a6.js';
|
|
30
31
|
import YoutubeGroup from './YoutubeGroup.js';
|
|
31
32
|
import './iconBase-602d52fe.js';
|
|
32
33
|
import { I as IoIosArrowForward } from './index.esm-29e48d38.js';
|