@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.
Files changed (40) hide show
  1. package/dist/cjs/AdSlotsProvider.js +7 -109
  2. package/dist/cjs/ArticleCarousel.js +2 -1
  3. package/dist/cjs/ArticleSeriesListing.js +2 -1
  4. package/dist/cjs/Auth.js +6 -6
  5. package/dist/cjs/BrowseVideosListing.js +2 -1
  6. package/dist/cjs/EventsDeck.js +10 -10
  7. package/dist/cjs/ExternalResources.js +5 -4
  8. package/dist/cjs/GroupDeck.js +4 -3
  9. package/dist/cjs/PartnerDetailListing.js +3 -2
  10. package/dist/cjs/TaxonomyDescription.js +3 -2
  11. package/dist/cjs/VideoProgramLandingPage.js +247 -0
  12. package/dist/cjs/VideoSeriesLandingPage.js +177 -0
  13. package/dist/cjs/VideoSeriesListing.js +2 -1
  14. package/dist/cjs/View.js +3 -2
  15. package/dist/cjs/YoutubeGroup.js +4 -3
  16. package/dist/cjs/getRelatedArticle.js +8 -8
  17. package/dist/cjs/getSerializers.js +3 -2
  18. package/dist/cjs/index-187c967e.js +54 -0
  19. package/dist/cjs/{index-b0cfd1de.js → index-9b8a57e5.js} +5 -5
  20. package/dist/cjs/index.js +8 -2
  21. package/dist/cjs/{smoothscroll-95231a70.js → smoothscroll-5054361f.js} +0 -50
  22. package/dist/esm/AdSlotsProvider.js +9 -111
  23. package/dist/esm/ArticleCarousel.js +2 -1
  24. package/dist/esm/ArticleSeriesListing.js +2 -1
  25. package/dist/esm/BrowseVideosListing.js +2 -1
  26. package/dist/esm/ExternalResources.js +3 -2
  27. package/dist/esm/GroupDeck.js +2 -1
  28. package/dist/esm/PartnerDetailListing.js +3 -2
  29. package/dist/esm/TaxonomyDescription.js +3 -2
  30. package/dist/esm/VideoProgramLandingPage.js +242 -0
  31. package/dist/esm/VideoSeriesLandingPage.js +172 -0
  32. package/dist/esm/VideoSeriesListing.js +2 -1
  33. package/dist/esm/View.js +3 -2
  34. package/dist/esm/YoutubeGroup.js +2 -1
  35. package/dist/esm/getSerializers.js +3 -2
  36. package/dist/esm/{index-c6440f6f.js → index-4d1ed4ba.js} +1 -1
  37. package/dist/esm/index-c7e2ac95.js +52 -0
  38. package/dist/esm/index.js +6 -2
  39. package/dist/esm/{smoothscroll-4b699764.js → smoothscroll-0cd4c7a6.js} +2 -51
  40. package/package.json +1 -1
@@ -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 './smoothscroll-4b699764.js';
18
+ import './index-c7e2ac95.js';
19
+ import './smoothscroll-0cd4c7a6.js';
19
20
  import './YoutubeGroup.js';
20
21
  import './iconBase-602d52fe.js';
21
22
  import { I as IoIosArrowForward } from './index.esm-29e48d38.js';
@@ -35,14 +35,15 @@ import './Segment.js';
35
35
  import './Beam.js';
36
36
  import './AdSlot.js';
37
37
  import { B as BlockContent } from './BlockContent-e9b4ddcf.js';
38
- import './smoothscroll-4b699764.js';
38
+ import './index-c7e2ac95.js';
39
+ import './smoothscroll-0cd4c7a6.js';
39
40
  import './GroupDeck.js';
40
41
  import 'react-bootstrap';
41
42
  import './iconBase-602d52fe.js';
42
43
  import './index.esm-29e48d38.js';
43
44
  import Button from 'react-bootstrap/Button';
44
45
  import { m as momentTimezone } from './index-ef6d5dcf.js';
45
- import { g as getSerializers } from './index-c6440f6f.js';
46
+ import { g as getSerializers } from './index-4d1ed4ba.js';
46
47
  import './util-7700fc59.js';
47
48
  import './brightcove-react-player-loader.es-83f53e4e.js';
48
49
  import 'react-bootstrap/Pagination';
@@ -10,7 +10,8 @@ import './_is-array-49698029.js';
10
10
  import React__default, { useRef, useState, useEffect } from 'react';
11
11
  import { i as imageUrlBuilder } from './index-73819142.js';
12
12
  import { _ as _slicedToArray } from './slicedToArray-7021e5df.js';
13
- import { s as smoothscroll, g as getYoutubeId } from './smoothscroll-4b699764.js';
13
+ import { g as getYoutubeId } from './index-c7e2ac95.js';
14
+ import { s as smoothscroll } from './smoothscroll-0cd4c7a6.js';
14
15
 
15
16
  var GroupDeck = function GroupDeck(props) {
16
17
  // Props should be an array of objects containing Thumbnail, title, and URL
@@ -43,7 +43,8 @@ import './ADlgInfeed-5b170d9e.js';
43
43
  import './getContentCategory-15dcc413.js';
44
44
  import './AuthorComponent-00f13201.js';
45
45
  import { B as BlockContent } from './BlockContent-e9b4ddcf.js';
46
- import { s as smoothscroll } from './smoothscroll-4b699764.js';
46
+ import './index-c7e2ac95.js';
47
+ import { s as smoothscroll } from './smoothscroll-0cd4c7a6.js';
47
48
  import './GroupDeck.js';
48
49
  import 'react-bootstrap';
49
50
  import './timeDifferenceCalc.js';
@@ -51,7 +52,7 @@ import QueueDeckExpanded from './QueueDeckExpanded.js';
51
52
  import './iconBase-602d52fe.js';
52
53
  import './index.esm-29e48d38.js';
53
54
  import 'react-bootstrap/Button';
54
- import { g as getSerializers } from './index-c6440f6f.js';
55
+ import { g as getSerializers } from './index-4d1ed4ba.js';
55
56
  import './util-7700fc59.js';
56
57
  import './brightcove-react-player-loader.es-83f53e4e.js';
57
58
  import 'react-bootstrap/Pagination';
@@ -35,13 +35,14 @@ import './Segment.js';
35
35
  import './Beam.js';
36
36
  import './AdSlot.js';
37
37
  import { B as BlockContent } from './BlockContent-e9b4ddcf.js';
38
- import './smoothscroll-4b699764.js';
38
+ import './index-c7e2ac95.js';
39
+ import './smoothscroll-0cd4c7a6.js';
39
40
  import './GroupDeck.js';
40
41
  import 'react-bootstrap';
41
42
  import './iconBase-602d52fe.js';
42
43
  import './index.esm-29e48d38.js';
43
44
  import 'react-bootstrap/Button';
44
- import { g as getSerializers } from './index-c6440f6f.js';
45
+ import { g as getSerializers } from './index-4d1ed4ba.js';
45
46
  import './util-7700fc59.js';
46
47
  import './brightcove-react-player-loader.es-83f53e4e.js';
47
48
  import 'react-bootstrap/Pagination';
@@ -0,0 +1,242 @@
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 './toConsumableArray-725434a0.js';
7
+ import './core.get-iterator-method-54d2e411.js';
8
+ import './_object-pie-71ac75a4.js';
9
+ import { _ as _extends } from './extends-cc5da797.js';
10
+ import './_object-sap-4d59d5bd.js';
11
+ import './inherits-7ee3e0c1.js';
12
+ import './define-property-de3fc946.js';
13
+ import './web.dom.iterable-8956f9a5.js';
14
+ import './typeof-08f2c380.js';
15
+ import './_is-array-49698029.js';
16
+ import React__default from 'react';
17
+ import './index-a9e53f80.js';
18
+ import 'prop-types';
19
+ import 'react-bootstrap/Container';
20
+ import 'react-bootstrap/Row';
21
+ import Col from 'react-bootstrap/Col';
22
+ import './moment-e2f9b20c.js';
23
+ import 'next/router';
24
+ import './isSymbol-807e927e.js';
25
+ import './debounce-1a993acf.js';
26
+ import './index.es-29c1cef5.js';
27
+ import 'react-dom';
28
+ import './visibility-sensor-0baa4eea.js';
29
+ import './index-73819142.js';
30
+ import './index-5f9f807a.js';
31
+ import './main-e4a934b2.js';
32
+ import './entities-7cc3bf45.js';
33
+ import './stringify-008c8802.js';
34
+ import './slicedToArray-7021e5df.js';
35
+ import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7c654f36.js';
36
+ import './_set-species-cede29f8.js';
37
+ import './Segment.js';
38
+ import './Beam.js';
39
+ import './AdSlot.js';
40
+ import { B as BlockContent } from './BlockContent-e9b4ddcf.js';
41
+ import './index-c7e2ac95.js';
42
+ import './smoothscroll-0cd4c7a6.js';
43
+ import './GroupDeck.js';
44
+ import './YoutubeGroup.js';
45
+ import 'react-bootstrap';
46
+ import './iconBase-602d52fe.js';
47
+ import './index.esm-29e48d38.js';
48
+ import VideoSeriesListing from './VideoSeriesListing.js';
49
+ import Button from 'react-bootstrap/Button';
50
+ import Form from 'react-bootstrap/Form';
51
+ import { g as getSerializers } from './index-4d1ed4ba.js';
52
+ import './util-7700fc59.js';
53
+ import './brightcove-react-player-loader.es-83f53e4e.js';
54
+ import 'react-bootstrap/Pagination';
55
+ import 'next/head';
56
+ import 'react-bootstrap/Figure';
57
+
58
+ var _this = undefined;
59
+
60
+ var cache = { topic_ids: [] };
61
+
62
+ var VideoProgramLandingPage = function VideoProgramLandingPage(props) {
63
+ var client = props.client,
64
+ virtualBlock = props.virtualBlock,
65
+ topics = props.topics,
66
+ posts = props.posts,
67
+ query = props.query,
68
+ params = props.params,
69
+ _props$currentPage = props.currentPage,
70
+ currentPage = _props$currentPage === undefined ? 1 : _props$currentPage,
71
+ pageview = props.pageview,
72
+ _props$columns = props.columns,
73
+ columns = _props$columns === undefined ? 'rotate' : _props$columns,
74
+ _props$variant = props.variant,
75
+ variant = _props$variant === undefined ? 'top' : _props$variant,
76
+ _props$page = props.page,
77
+ page = _props$page === undefined ? '' : _props$page,
78
+ _props$autoScroll = props.autoScroll,
79
+ autoScroll = _props$autoScroll === undefined ? true : _props$autoScroll,
80
+ defaultImage = props.defaultImage,
81
+ mapping = props.mapping;
82
+
83
+ return React__default.createElement(
84
+ 'div',
85
+ null,
86
+ virtualBlock && React__default.createElement(BlockContent, _extends({ serializers: getSerializers(client), blocks: virtualBlock.body, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config())),
87
+ React__default.createElement(
88
+ 'div',
89
+ { className: 'peer-exchange-filter-container' },
90
+ React__default.createElement(
91
+ Form,
92
+ { className: 'ml-3', method: 'post' },
93
+ React__default.createElement(
94
+ Form.Row,
95
+ null,
96
+ React__default.createElement(
97
+ Col,
98
+ null,
99
+ React__default.createElement(
100
+ Form.Group,
101
+ { controlId: 'topic' },
102
+ React__default.createElement(
103
+ Form.Control,
104
+ { as: 'select', name: 'topic_id', placeholder: 'Filter by Topic' },
105
+ React__default.createElement(
106
+ 'option',
107
+ { value: '' },
108
+ 'All Topics'
109
+ ),
110
+ topics && topics.map(function (topic) {
111
+ if (props.topic_id === topic._id || topic.name == 'Peer Exchange') {
112
+ return null;
113
+ } else {
114
+ return React__default.createElement(
115
+ 'option',
116
+ { value: topic._id },
117
+ topic.name
118
+ );
119
+ }
120
+ })
121
+ )
122
+ )
123
+ ),
124
+ React__default.createElement(
125
+ Col,
126
+ null,
127
+ React__default.createElement(
128
+ Button,
129
+ { type: 'submit', variant: 'secondary' },
130
+ 'Apply'
131
+ )
132
+ )
133
+ )
134
+ )
135
+ ),
136
+ posts && React__default.createElement(VideoSeriesListing, {
137
+ client: client,
138
+ mapping: mapping,
139
+ dataRecord: posts,
140
+ query: query,
141
+ params: params,
142
+ currentPage: currentPage,
143
+ pageview: pageview,
144
+ columns: columns,
145
+ variant: variant,
146
+ page: page,
147
+ autoScroll: autoScroll,
148
+ defaultImage: defaultImage
149
+ })
150
+ );
151
+ };
152
+
153
+ VideoProgramLandingPage.getInitialData = function () {
154
+ var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(context, client) {
155
+ var itemsPerPage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 6;
156
+ var topicId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
157
+ var pathname, virtualBlock, query, taxonomy_ids_res, taxonomy_ids, i, res, j, topics, urlQuery, currentPage, start, params, posts;
158
+ return regenerator.wrap(function _callee$(_context) {
159
+ while (1) {
160
+ switch (_context.prev = _context.next) {
161
+ case 0:
162
+ // Virtual Block
163
+ pathname = context.pathname;
164
+ _context.next = 3;
165
+ return client.fetch('*[_type == \'virtualBlock\' && identifier == \'' + pathname + '\'][0]');
166
+
167
+ case 3:
168
+ virtualBlock = _context.sent;
169
+
170
+
171
+ // Topics for filtering
172
+ query = '';
173
+
174
+ if (!(cache && cache.topic_ids && cache.topic_ids.length > 0)) {
175
+ _context.next = 8;
176
+ break;
177
+ }
178
+
179
+ _context.next = 15;
180
+ break;
181
+
182
+ case 8:
183
+ query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url)\n && references(\'02c6c999-e6fe-4275-98ca-ceef28f91e14\') \n && is_visible == true \n && dateTime(published) <= dateTime(now())\n ]{\n \'taxonomy_id\': taxonomyMapping[]->_id\n }';
184
+ _context.next = 11;
185
+ return client.fetch(query);
186
+
187
+ case 11:
188
+ taxonomy_ids_res = _context.sent;
189
+ taxonomy_ids = [];
190
+
191
+ for (i = 0; i < taxonomy_ids_res.length; i++) {
192
+ res = taxonomy_ids_res[i];
193
+
194
+ for (j = 0; j < res.taxonomy_id.length; j++) {
195
+ if (!taxonomy_ids.includes(res.taxonomy_id[j])) {
196
+ taxonomy_ids.push(res.taxonomy_id[j]);
197
+ }
198
+ }
199
+ }
200
+ cache.topic_ids = taxonomy_ids;
201
+
202
+ case 15:
203
+ query = '*[_type == \'taxonomy\' && _id in $taxonomy_ids] | order(name asc)';
204
+ _context.next = 18;
205
+ return client.fetch(query, { taxonomy_ids: cache.topic_ids });
206
+
207
+ case 18:
208
+ topics = _context.sent;
209
+
210
+
211
+ // Posts
212
+ urlQuery = context.query;
213
+ currentPage = urlQuery.page ? parseInt(urlQuery.page) : 1;
214
+ start = (currentPage - 1) * itemsPerPage;
215
+ params = {
216
+ from: start,
217
+ to: start + itemsPerPage,
218
+ url: pathname
219
+ };
220
+
221
+ query = '*[\n _type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible == true\n && dateTime(published) <= dateTime(now())\n && references(\'02c6c999-e6fe-4275-98ca-ceef28f91e14\')\n ' + (topicId ? '&& references(\'' + topicId + '\')' : '') + '\n ] | order(published desc) [$from...$to]{\n \t\t...,\n \t\ttitle,\n \t\tsummary,\n \t\tpublished,\n \t\tthumbnail,\n \t\turl,\n \t\ttaxonomy,\n \t\tcontentCategory->,\n \t\tbody[_type == "youtubeGallery"],\n \t\t\'pageNumber\': ' + currentPage + '\n \t}';
222
+ _context.next = 26;
223
+ return client.fetch(query, params);
224
+
225
+ case 26:
226
+ posts = _context.sent;
227
+ return _context.abrupt('return', { virtualBlock: virtualBlock, topics: topics, posts: posts, query: query, params: params, currentPage: currentPage });
228
+
229
+ case 28:
230
+ case 'end':
231
+ return _context.stop();
232
+ }
233
+ }
234
+ }, _callee, _this);
235
+ }));
236
+
237
+ return function (_x, _x2) {
238
+ return _ref.apply(this, arguments);
239
+ };
240
+ }();
241
+
242
+ export default VideoProgramLandingPage;
@@ -0,0 +1,172 @@
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 './toConsumableArray-725434a0.js';
7
+ import './core.get-iterator-method-54d2e411.js';
8
+ import './_object-pie-71ac75a4.js';
9
+ import './extends-cc5da797.js';
10
+ import './_object-sap-4d59d5bd.js';
11
+ import './inherits-7ee3e0c1.js';
12
+ import './define-property-de3fc946.js';
13
+ import './web.dom.iterable-8956f9a5.js';
14
+ import { _ as _typeof } from './typeof-08f2c380.js';
15
+ import './_is-array-49698029.js';
16
+ import React__default from 'react';
17
+ import './index-a9e53f80.js';
18
+ import 'prop-types';
19
+ import 'react-bootstrap/Container';
20
+ import 'react-bootstrap/Row';
21
+ import 'react-bootstrap/Col';
22
+ import 'react-bootstrap/Card';
23
+ import { m as moment } from './moment-e2f9b20c.js';
24
+ import 'next/router';
25
+ import './isSymbol-807e927e.js';
26
+ import './debounce-1a993acf.js';
27
+ import './index.es-29c1cef5.js';
28
+ import 'react-dom';
29
+ import './visibility-sensor-0baa4eea.js';
30
+ import './index-73819142.js';
31
+ import './index-5f9f807a.js';
32
+ import './main-e4a934b2.js';
33
+ import './stringify-008c8802.js';
34
+ import './slicedToArray-7021e5df.js';
35
+ import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7c654f36.js';
36
+ import './_set-species-cede29f8.js';
37
+ import './Segment.js';
38
+ import './Beam.js';
39
+ import './AdSlot.js';
40
+ import './ADInfeed-d4c94a16.js';
41
+ import './lodash-17fdfebb.js';
42
+ import './ADlgInfeed-5b170d9e.js';
43
+ import { g as getYoutubeId } from './index-c7e2ac95.js';
44
+ import MasterDeck from './MasterDeck.js';
45
+ import 'react-bootstrap/Breadcrumb';
46
+ import Breadcrumbs from './Breadcrumbs.js';
47
+ import './style-inject.es-1f59c1d0.js';
48
+ import VideoSeriesCard from './VideoSeriesCard.js';
49
+
50
+ var _this = undefined;
51
+
52
+ var VideoSeriesLandingPage = function VideoSeriesLandingPage(props) {
53
+ var summary = props.summary,
54
+ client = props.client,
55
+ posts = props.posts,
56
+ _props$variant = props.variant,
57
+ variant = _props$variant === undefined ? 'left' : _props$variant,
58
+ _props$defaultImage = props.defaultImage,
59
+ defaultImage = _props$defaultImage === undefined ? '/placeholder.jpg' : _props$defaultImage,
60
+ mapping = props.mapping,
61
+ query = props.query,
62
+ params = props.params,
63
+ _props$currentPage = props.currentPage,
64
+ currentPage = _props$currentPage === undefined ? 1 : _props$currentPage,
65
+ pageview = props.pageview,
66
+ _props$autoScroll = props.autoScroll,
67
+ autoScroll = _props$autoScroll === undefined ? true : _props$autoScroll,
68
+ rightItems = props.rightItems,
69
+ brandInsightAd = props.brandInsightAd,
70
+ _props$showBI = props.showBI,
71
+ showBI = _props$showBI === undefined ? false : _props$showBI,
72
+ _props$lgInfeedAd = props.lgInfeedAd,
73
+ lgInfeedAd = _props$lgInfeedAd === undefined ? false : _props$lgInfeedAd;
74
+
75
+ return React__default.createElement(
76
+ 'div',
77
+ null,
78
+ summary && React__default.createElement(
79
+ 'div',
80
+ { style: { fontSize: '1rem' }, className: 'series-summary px-1 my-4' },
81
+ summary
82
+ ),
83
+ React__default.createElement(Breadcrumbs, null),
84
+ posts && React__default.createElement(MasterDeck, {
85
+ deck: VideoSeriesCard,
86
+ variant: variant,
87
+ client: client,
88
+ defaultImage: defaultImage,
89
+ mapping: mapping,
90
+ dataRecord: posts,
91
+ query: query,
92
+ params: params,
93
+ currentPage: currentPage,
94
+ pageview: pageview,
95
+ autoScroll: autoScroll,
96
+ rightItems: rightItems,
97
+ brandInsightAd: brandInsightAd,
98
+ showBI: showBI,
99
+ lgInfeedAd: lgInfeedAd
100
+ })
101
+ );
102
+ };
103
+
104
+ VideoSeriesLandingPage.getInitialData = function () {
105
+ var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(context, client) {
106
+ var itemsPerPage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
107
+ var today, urlQuery, seriesName, currentPage, start, params, query, posts, seriesTitle, summary, url;
108
+ return regenerator.wrap(function _callee$(_context) {
109
+ while (1) {
110
+ switch (_context.prev = _context.next) {
111
+ case 0:
112
+ today = moment().utc().format();
113
+ urlQuery = context.query;
114
+ seriesName = urlQuery.series;
115
+ currentPage = urlQuery.page ? parseInt(urlQuery.page) : 1;
116
+ start = (currentPage - 1) * itemsPerPage;
117
+ params = {
118
+ from: start,
119
+ to: start + itemsPerPage,
120
+ itemsPerPage: itemsPerPage
121
+ };
122
+ 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}';
123
+ _context.next = 9;
124
+ return client.fetch(query, params);
125
+
126
+ case 9:
127
+ posts = _context.sent;
128
+ seriesTitle = '';
129
+ summary = '';
130
+
131
+
132
+ if (posts.length > 0 && posts[0].body.length > 0 && posts[0].body[0].videos) {
133
+ url = posts[0].url.current + '?seriesVid=';
134
+
135
+ seriesTitle = posts[0].title;
136
+ summary = posts[0].summary;
137
+ posts = posts[0].body[0].videos.filter(function (video) {
138
+ if ((video.is_visible === true || !video.hasOwnProperty('is_visible')) && (today >= video.published || !video.hasOwnProperty('published'))) {
139
+ return video;
140
+ }
141
+ });
142
+ //start youtube thumbnail fix
143
+ posts.map(function (post, index) {
144
+ if (post.thumbnail && _typeof(post.thumbnail) !== 'object' || !post.thumbnail) {
145
+ var id = getYoutubeId(post.url);
146
+ var imageURL = 'https://img.youtube.com/vi/' + id + '/hqdefault.jpg';
147
+ return post['thumbnail'] = imageURL, post['url'] = {
148
+ current: url + (index + 1)
149
+ };
150
+ }
151
+ return post['url'] = {
152
+ current: url + (index + 1)
153
+ };
154
+ });
155
+ //end
156
+ }
157
+ return _context.abrupt('return', { posts: posts, query: query, params: params, seriesTitle: seriesTitle, summary: summary, seriesName: seriesName });
158
+
159
+ case 14:
160
+ case 'end':
161
+ return _context.stop();
162
+ }
163
+ }
164
+ }, _callee, _this);
165
+ }));
166
+
167
+ return function (_x, _x2) {
168
+ return _ref.apply(this, arguments);
169
+ };
170
+ }();
171
+
172
+ export default VideoSeriesLandingPage;
@@ -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 './smoothscroll-4b699764.js';
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';
package/dist/esm/View.js CHANGED
@@ -36,14 +36,15 @@ import './Segment.js';
36
36
  import './Beam.js';
37
37
  import DFPAdSlot from './AdSlot.js';
38
38
  import { B as BlockContent } from './BlockContent-e9b4ddcf.js';
39
- import './smoothscroll-4b699764.js';
39
+ import './index-c7e2ac95.js';
40
+ import './smoothscroll-0cd4c7a6.js';
40
41
  import './GroupDeck.js';
41
42
  import 'react-bootstrap';
42
43
  import './iconBase-602d52fe.js';
43
44
  import './index.esm-29e48d38.js';
44
45
  import Button from 'react-bootstrap/Button';
45
46
  import Form from 'react-bootstrap/Form';
46
- import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-c6440f6f.js';
47
+ import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-4d1ed4ba.js';
47
48
  import './util-7700fc59.js';
48
49
  import './brightcove-react-player-loader.es-83f53e4e.js';
49
50
  import 'react-bootstrap/Pagination';
@@ -14,7 +14,8 @@ import { i as imageUrlBuilder } from './index-73819142.js';
14
14
  import { L as LazyLoad } from './index-5f9f807a.js';
15
15
  import { m as main_36, a as main_41, b as main_35 } from './main-e4a934b2.js';
16
16
  import { _ as _slicedToArray } from './slicedToArray-7021e5df.js';
17
- import { s as smoothscroll, g as getYoutubeId } from './smoothscroll-4b699764.js';
17
+ import { g as getYoutubeId } from './index-c7e2ac95.js';
18
+ import { s as smoothscroll } from './smoothscroll-0cd4c7a6.js';
18
19
 
19
20
  /*
20
21
  GROQ query -
@@ -35,13 +35,14 @@ import './Segment.js';
35
35
  import './Beam.js';
36
36
  import './AdSlot.js';
37
37
  import './BlockContent-e9b4ddcf.js';
38
- import './smoothscroll-4b699764.js';
38
+ import './index-c7e2ac95.js';
39
+ import './smoothscroll-0cd4c7a6.js';
39
40
  import './GroupDeck.js';
40
41
  import 'react-bootstrap';
41
42
  import './iconBase-602d52fe.js';
42
43
  import './index.esm-29e48d38.js';
43
44
  import 'react-bootstrap/Button';
44
- export { g as default } from './index-c6440f6f.js';
45
+ export { g as default } from './index-4d1ed4ba.js';
45
46
  import './util-7700fc59.js';
46
47
  import './brightcove-react-player-loader.es-83f53e4e.js';
47
48
  import 'react-bootstrap/Pagination';
@@ -19,7 +19,7 @@ import Segment from './Segment.js';
19
19
  import Beam from './Beam.js';
20
20
  import DFPAdSlot from './AdSlot.js';
21
21
  import { B as BlockContent } from './BlockContent-e9b4ddcf.js';
22
- import { g as getYoutubeId } from './smoothscroll-4b699764.js';
22
+ import { g as getYoutubeId } from './index-c7e2ac95.js';
23
23
  import GroupDeck from './GroupDeck.js';
24
24
  import { Carousel, Table, Figure as Figure$1, Button, ProgressBar, Card, Row as Row$1, Col as Col$1 } from 'react-bootstrap';
25
25
  import { d as IoIosArrowDropupCircle } from './index.esm-29e48d38.js';
@@ -0,0 +1,52 @@
1
+ import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
2
+
3
+ var getYoutubeId = createCommonjsModule(function (module, exports) {
4
+ (function (root, factory) {
5
+ {
6
+ module.exports = factory();
7
+ }
8
+ }(commonjsGlobal, function (exports) {
9
+
10
+ return function (url, opts) {
11
+ if (opts == undefined) {
12
+ opts = {fuzzy: true};
13
+ }
14
+
15
+ if (/youtu\.?be/.test(url)) {
16
+
17
+ // Look first for known patterns
18
+ var i;
19
+ var patterns = [
20
+ /youtu\.be\/([^#\&\?]{11})/, // youtu.be/<id>
21
+ /\?v=([^#\&\?]{11})/, // ?v=<id>
22
+ /\&v=([^#\&\?]{11})/, // &v=<id>
23
+ /embed\/([^#\&\?]{11})/, // embed/<id>
24
+ /\/v\/([^#\&\?]{11})/ // /v/<id>
25
+ ];
26
+
27
+ // If any pattern matches, return the ID
28
+ for (i = 0; i < patterns.length; ++i) {
29
+ if (patterns[i].test(url)) {
30
+ return patterns[i].exec(url)[1];
31
+ }
32
+ }
33
+
34
+ if (opts.fuzzy) {
35
+ // If that fails, break it apart by certain characters and look
36
+ // for the 11 character key
37
+ var tokens = url.split(/[\/\&\?=#\.\s]/g);
38
+ for (i = 0; i < tokens.length; ++i) {
39
+ if (/^[^#\&\?]{11}$/.test(tokens[i])) {
40
+ return tokens[i];
41
+ }
42
+ }
43
+ }
44
+ }
45
+
46
+ return null;
47
+ };
48
+
49
+ }));
50
+ });
51
+
52
+ export { getYoutubeId as g };
package/dist/esm/index.js CHANGED
@@ -54,7 +54,8 @@ import './BlockContent-e9b4ddcf.js';
54
54
  import './react-social-icons-a7d5c5c7.js';
55
55
  export { default as TaxonomyCard } from './TaxonomyCard.js';
56
56
  export { default as RolesDeck } from './RolesDeck.js';
57
- import './smoothscroll-4b699764.js';
57
+ import './index-c7e2ac95.js';
58
+ import './smoothscroll-0cd4c7a6.js';
58
59
  export { default as GroupDeck } from './GroupDeck.js';
59
60
  export { default as YoutubeGroup } from './YoutubeGroup.js';
60
61
  import 'react-bootstrap';
@@ -79,7 +80,7 @@ import 'react-bootstrap/Form';
79
80
  import './index-ef6d5dcf.js';
80
81
  import './js.cookie-6874175c.js';
81
82
  export { default as CMEDeck } from './CMEDeck.js';
82
- export { g as getSerializers } from './index-c6440f6f.js';
83
+ export { g as getSerializers } from './index-4d1ed4ba.js';
83
84
  import './util-7700fc59.js';
84
85
  import './brightcove-react-player-loader.es-83f53e4e.js';
85
86
  import 'react-bootstrap/Pagination';
@@ -173,3 +174,6 @@ export { default as urlFor } from './urlFor.js';
173
174
  import './style-inject.es-1f59c1d0.js';
174
175
  import 'react-twitter-embed';
175
176
  export { default as PartnerDetailListing } from './PartnerDetailListing.js';
177
+ export { default as VideoProgramLandingPage } from './VideoProgramLandingPage.js';
178
+ import './VideoSeriesCard.js';
179
+ export { default as VideoSeriesLandingPage } from './VideoSeriesLandingPage.js';