@mjhls/mjh-framework 1.0.994-podcasts → 1.0.994-yt-lazyloading-test
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/AlgoliaSearch.js +0 -2
- package/dist/cjs/ArticleProgramLandingPage.js +1 -1
- package/dist/cjs/ExternalResources.js +1 -1
- package/dist/cjs/HorizontalArticleListing.js +1 -1
- package/dist/cjs/IssueLanding.js +1 -1
- package/dist/cjs/{Tooltip-f075b7ef.js → MediaSeriesCard-a956c3ed.js} +73 -0
- package/dist/cjs/MediaSeriesLanding.js +16 -17
- package/dist/cjs/MediaSeriesLandingPaginated.js +15 -16
- package/dist/cjs/PartnerDetailListing.js +1 -1
- package/dist/cjs/PartnerDetailListingPaginated.js +1 -1
- package/dist/cjs/TaxonomyDescription.js +1 -1
- package/dist/cjs/VideoProgramLandingPage.js +1 -1
- package/dist/cjs/View.js +1 -1
- package/dist/cjs/getSerializers.js +1 -1
- package/dist/cjs/{index-e9d3f910.js → index-f95a3c0f.js} +20 -7
- package/dist/cjs/index.js +1 -1
- package/dist/esm/AlgoliaSearch.js +0 -2
- package/dist/esm/ArticleProgramLandingPage.js +1 -1
- package/dist/esm/ExternalResources.js +1 -1
- package/dist/esm/HorizontalArticleListing.js +1 -1
- package/dist/esm/IssueLanding.js +1 -1
- package/dist/esm/{Tooltip-95655b44.js → MediaSeriesCard-5561513e.js} +73 -1
- package/dist/esm/MediaSeriesLanding.js +7 -8
- package/dist/esm/MediaSeriesLandingPaginated.js +6 -7
- package/dist/esm/PartnerDetailListing.js +1 -1
- package/dist/esm/PartnerDetailListingPaginated.js +1 -1
- package/dist/esm/TaxonomyDescription.js +1 -1
- package/dist/esm/VideoProgramLandingPage.js +1 -1
- package/dist/esm/View.js +1 -1
- package/dist/esm/getSerializers.js +1 -1
- package/dist/esm/{index-9a58ca55.js → index-04817712.js} +20 -7
- package/dist/esm/index.js +1 -1
- package/package.json +3 -3
- package/dist/cjs/MediaSeriesCard-443d909e.js +0 -81
- package/dist/cjs/PodcastsLanding.js +0 -235
- package/dist/esm/MediaSeriesCard-2403a1d3.js +0 -75
- package/dist/esm/PodcastsLanding.js +0 -228
|
@@ -3,6 +3,13 @@ import React__default, { useCallback, useRef, useState, useContext, useMemo, use
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import ReactDOM from 'react-dom';
|
|
5
5
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
6
|
+
import { _ as _typeof } from './typeof-e9fc0c5d.js';
|
|
7
|
+
import { L as LazyLoad } from './index-755f2cc2.js';
|
|
8
|
+
import urlFor from './urlFor.js';
|
|
9
|
+
import { m as moment } from './moment-bc12cb97.js';
|
|
10
|
+
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
11
|
+
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
12
|
+
import { g as getSerializers } from './index-04817712.js';
|
|
6
13
|
|
|
7
14
|
/**
|
|
8
15
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -9442,4 +9449,69 @@ var Tooltip = React__default.forwardRef(function (_ref, ref) {
|
|
|
9442
9449
|
Tooltip.defaultProps = defaultProps;
|
|
9443
9450
|
Tooltip.displayName = 'Tooltip';
|
|
9444
9451
|
|
|
9445
|
-
|
|
9452
|
+
var css = ".MediaSeriesCard-module_article__SAFYK {\n width: 100%;\n margin: 0 0 1rem 0;\n}\n.MediaSeriesCard-module_article__SAFYK a {\n display: flex;\n width: 100%;\n color: #000000;\n}\n.MediaSeriesCard-module_thumb__3jRAU {\n width: 25%;\n}\n.MediaSeriesCard-module_thumb__3jRAU img {\n width: 100%;\n height: auto;\n}\n.MediaSeriesCard-module_info__3L7_o {\n width: 75%;\n font-size: 1rem;\n}\n.MediaSeriesCard-module_info__3L7_o h2 {\n font-weight: bold;\n font-size: 1.25rem;\n margin: 0;\n}\n.MediaSeriesCard-module_published__E4oiz {\n color: #6d6d6d;\n margin: 0;\n}\n.MediaSeriesCard-module_summary__1xanh {\n margin: 0.5rem 0 0 0;\n}\n.MediaSeriesCard-module_author__e5fuR {\n margin: 0;\n}\n.MediaSeriesCard-module_author__e5fuR span {\n color: #6d6d6d;\n}\n.MediaSeriesCard-module_name__2m5KY {\n font-size: 1.3rem;\n font-weight: bold;\n}\n@media only screen and (max-width: 568px) {\n .MediaSeriesCard-module_article__SAFYK {\n margin: 1rem 0;\n box-shadow: 2px 4px 8px rgba(0,0,0,.2);\n }\n .MediaSeriesCard-module_article__SAFYK a {\n flex-direction: column;\n align-items: center;\n }\n .MediaSeriesCard-module_thumb__3jRAU {\n overflow: hidden;\n width: 100%;\n margin-bottom: 1rem;\n }\n .MediaSeriesCard-module_thumb__3jRAU img{\n border-radius: 10px 10px 0 0; \n }\n .MediaSeriesCard-module_thumb__3jRAU figure {\n margin: 0;\n }\n .MediaSeriesCard-module_info__3L7_o {\n width: 90%;\n padding: 0rem !important;\n }\n .MediaSeriesCard-module_info__3L7_o h2 {\n font-size: 1rem;\n }\n .MediaSeriesCard-module_name__2m5KY {\n font-size: 1rem;\n \n }\n}\n";
|
|
9453
|
+
var styles = { "article": "MediaSeriesCard-module_article__SAFYK", "thumb": "MediaSeriesCard-module_thumb__3jRAU", "info": "MediaSeriesCard-module_info__3L7_o", "published": "MediaSeriesCard-module_published__E4oiz", "summary": "MediaSeriesCard-module_summary__1xanh", "author": "MediaSeriesCard-module_author__e5fuR", "name": "MediaSeriesCard-module_name__2m5KY" };
|
|
9454
|
+
styleInject(css);
|
|
9455
|
+
|
|
9456
|
+
var MediaSeriesCard = function MediaSeriesCard(props) {
|
|
9457
|
+
var data = props.data,
|
|
9458
|
+
variant = props.variant,
|
|
9459
|
+
defaultImage = props.defaultImage,
|
|
9460
|
+
client = props.client;
|
|
9461
|
+
|
|
9462
|
+
|
|
9463
|
+
return React__default.createElement(
|
|
9464
|
+
'div',
|
|
9465
|
+
{ className: 'media-series-article ' + styles.article },
|
|
9466
|
+
React__default.createElement(
|
|
9467
|
+
'a',
|
|
9468
|
+
{ href: '/' + data.parentUrl + '/' + data.identifier.current, style: variant === 'right' ? { flexDirection: 'row-reverse' } : {} },
|
|
9469
|
+
React__default.createElement(
|
|
9470
|
+
'div',
|
|
9471
|
+
{ className: 'media-series-thumbnail ' + styles.thumb },
|
|
9472
|
+
data.thumbnail && data.thumbnail.asset && React__default.createElement(
|
|
9473
|
+
'figure',
|
|
9474
|
+
null,
|
|
9475
|
+
React__default.createElement(
|
|
9476
|
+
LazyLoad,
|
|
9477
|
+
null,
|
|
9478
|
+
React__default.createElement('img', {
|
|
9479
|
+
src: data.thumbnail && data.thumbnail.asset ? urlFor({ client: client, source: data.thumbnail }) : data.thumbnail && _typeof(data.thumbnail == 'string') ? data.thumbnail : defaultImage
|
|
9480
|
+
})
|
|
9481
|
+
)
|
|
9482
|
+
)
|
|
9483
|
+
),
|
|
9484
|
+
React__default.createElement(
|
|
9485
|
+
'div',
|
|
9486
|
+
{ className: 'media-series-info ' + styles.info, style: variant === 'right' ? { padding: '0 1rem 0 0' } : { padding: ' 0 0 0 1rem' } },
|
|
9487
|
+
React__default.createElement(
|
|
9488
|
+
'div',
|
|
9489
|
+
{ className: 'media-series-name ' + styles.name },
|
|
9490
|
+
data.name
|
|
9491
|
+
),
|
|
9492
|
+
data.published && React__default.createElement(
|
|
9493
|
+
'p',
|
|
9494
|
+
{ className: 'media-series-published ' + styles.published },
|
|
9495
|
+
moment(data.published).format('MMMM Do YYYY')
|
|
9496
|
+
),
|
|
9497
|
+
data.authorMapping && data.authorMapping.displayName && React__default.createElement(
|
|
9498
|
+
'p',
|
|
9499
|
+
{ className: 'media-series-author ' + styles.author },
|
|
9500
|
+
'By ',
|
|
9501
|
+
React__default.createElement(
|
|
9502
|
+
'span',
|
|
9503
|
+
null,
|
|
9504
|
+
data.authorMapping.displayName
|
|
9505
|
+
)
|
|
9506
|
+
),
|
|
9507
|
+
data.description && React__default.createElement(
|
|
9508
|
+
'div',
|
|
9509
|
+
{ className: 'media-series-desc' },
|
|
9510
|
+
React__default.createElement(BlockContent, { blocks: data.description, serializers: getSerializers(client) })
|
|
9511
|
+
)
|
|
9512
|
+
)
|
|
9513
|
+
)
|
|
9514
|
+
);
|
|
9515
|
+
};
|
|
9516
|
+
|
|
9517
|
+
export { DropdownButton as D, MediaSeriesCard as M, Dropdown as a };
|
|
@@ -3,14 +3,13 @@ import { _ as _typeof } from './typeof-e9fc0c5d.js';
|
|
|
3
3
|
import { _ as _extends } from './extends-6d8e3924.js';
|
|
4
4
|
import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
|
|
5
5
|
import React__default, { useState, useEffect } from 'react';
|
|
6
|
-
import { D as DropdownButton, a as Dropdown } from './
|
|
6
|
+
import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-5561513e.js';
|
|
7
7
|
import './index-98ca9cec.js';
|
|
8
8
|
import 'react-dom';
|
|
9
9
|
import Link from 'next/link';
|
|
10
10
|
import MasterDeck from './MasterDeck.js';
|
|
11
|
-
import { M as MediaSeriesCard } from './MediaSeriesCard-2403a1d3.js';
|
|
12
11
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
13
|
-
import { g as getSerializers } from './index-
|
|
12
|
+
import { g as getSerializers } from './index-04817712.js';
|
|
14
13
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
15
14
|
import './core.get-iterator-method-ea258bb1.js';
|
|
16
15
|
import './web.dom.iterable-ab4dea5c.js';
|
|
@@ -19,6 +18,11 @@ import './_iter-detect-98db3b07.js';
|
|
|
19
18
|
import './_is-array-8d21b9e3.js';
|
|
20
19
|
import './_object-pie-133f504a.js';
|
|
21
20
|
import 'prop-types';
|
|
21
|
+
import './index-755f2cc2.js';
|
|
22
|
+
import './urlFor.js';
|
|
23
|
+
import './index-3f5c03b2.js';
|
|
24
|
+
import './moment-bc12cb97.js';
|
|
25
|
+
import './style-inject.es-1f59c1d0.js';
|
|
22
26
|
import './toConsumableArray-f7074d7c.js';
|
|
23
27
|
import './inherits-a6ba2ec4.js';
|
|
24
28
|
import './_object-sap-7cee6f84.js';
|
|
@@ -29,7 +33,6 @@ import 'react-bootstrap/Container';
|
|
|
29
33
|
import 'react-bootstrap/Row';
|
|
30
34
|
import 'react-bootstrap/Col';
|
|
31
35
|
import 'react-bootstrap/Card';
|
|
32
|
-
import './moment-bc12cb97.js';
|
|
33
36
|
import 'next/router';
|
|
34
37
|
import './lodash-f97fd99a.js';
|
|
35
38
|
import './debounce-533d9748.js';
|
|
@@ -37,7 +40,6 @@ import './isSymbol-a7e9aafe.js';
|
|
|
37
40
|
import './toNumber-5aeba6e7.js';
|
|
38
41
|
import './index.es-a6137319.js';
|
|
39
42
|
import './visibility-sensor-72fd8f8b.js';
|
|
40
|
-
import './index-3f5c03b2.js';
|
|
41
43
|
import './ADlgInfeed-5e36f317.js';
|
|
42
44
|
import './AdSlot.js';
|
|
43
45
|
import './Beam.js';
|
|
@@ -45,9 +47,6 @@ import './stringify-2b084bee.js';
|
|
|
45
47
|
import './Segment.js';
|
|
46
48
|
import './main-1894c974.js';
|
|
47
49
|
import './ADInfeed-5765a73a.js';
|
|
48
|
-
import './index-755f2cc2.js';
|
|
49
|
-
import './urlFor.js';
|
|
50
|
-
import './style-inject.es-1f59c1d0.js';
|
|
51
50
|
import 'react-bootstrap';
|
|
52
51
|
import './index-c7e2ac95.js';
|
|
53
52
|
import './util-8ed16d48.js';
|
|
@@ -3,14 +3,13 @@ import { _ as _typeof } from './typeof-e9fc0c5d.js';
|
|
|
3
3
|
import { _ as _extends } from './extends-6d8e3924.js';
|
|
4
4
|
import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
|
|
5
5
|
import React__default, { useState, useEffect } from 'react';
|
|
6
|
-
import { D as DropdownButton, a as Dropdown } from './
|
|
6
|
+
import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-5561513e.js';
|
|
7
7
|
import './index-98ca9cec.js';
|
|
8
8
|
import 'react-dom';
|
|
9
9
|
import Link from 'next/link';
|
|
10
10
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
11
11
|
import MasterDeck from './MasterDeckPaginated.js';
|
|
12
|
-
import {
|
|
13
|
-
import { g as getSerializers } from './index-9a58ca55.js';
|
|
12
|
+
import { g as getSerializers } from './index-04817712.js';
|
|
14
13
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
15
14
|
import './core.get-iterator-method-ea258bb1.js';
|
|
16
15
|
import './web.dom.iterable-ab4dea5c.js';
|
|
@@ -19,7 +18,11 @@ import './_iter-detect-98db3b07.js';
|
|
|
19
18
|
import './_is-array-8d21b9e3.js';
|
|
20
19
|
import './_object-pie-133f504a.js';
|
|
21
20
|
import 'prop-types';
|
|
21
|
+
import './index-755f2cc2.js';
|
|
22
|
+
import './urlFor.js';
|
|
22
23
|
import './index-3f5c03b2.js';
|
|
24
|
+
import './moment-bc12cb97.js';
|
|
25
|
+
import './style-inject.es-1f59c1d0.js';
|
|
23
26
|
import './stringify-2b084bee.js';
|
|
24
27
|
import './toConsumableArray-f7074d7c.js';
|
|
25
28
|
import './inherits-a6ba2ec4.js';
|
|
@@ -45,10 +48,6 @@ import './Pagination-dc30727b.js';
|
|
|
45
48
|
import 'react-bootstrap/Button';
|
|
46
49
|
import './index.esm-1bd8a0a8.js';
|
|
47
50
|
import './iconBase-ccc56b97.js';
|
|
48
|
-
import './index-755f2cc2.js';
|
|
49
|
-
import './urlFor.js';
|
|
50
|
-
import './moment-bc12cb97.js';
|
|
51
|
-
import './style-inject.es-1f59c1d0.js';
|
|
52
51
|
import 'react-bootstrap';
|
|
53
52
|
import './index-c7e2ac95.js';
|
|
54
53
|
import './util-8ed16d48.js';
|
|
@@ -11,7 +11,7 @@ import QueueDeckExpanded from './QueueDeckExpanded.js';
|
|
|
11
11
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
12
12
|
import Feature from './Feature.js';
|
|
13
13
|
import urlFor from './urlFor.js';
|
|
14
|
-
import { g as getSerializers } from './index-
|
|
14
|
+
import { g as getSerializers } from './index-04817712.js';
|
|
15
15
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
16
16
|
import { c as checkSisterSite } from './checkSisterSite-baa4fb6b.js';
|
|
17
17
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
@@ -11,7 +11,7 @@ import QueueDeckExpanded from './QueueDeckExpandedPaginated.js';
|
|
|
11
11
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
12
12
|
import Feature from './Feature.js';
|
|
13
13
|
import urlFor from './urlFor.js';
|
|
14
|
-
import { g as getSerializers } from './index-
|
|
14
|
+
import { g as getSerializers } from './index-04817712.js';
|
|
15
15
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
16
16
|
import { c as checkSisterSite } from './checkSisterSite-baa4fb6b.js';
|
|
17
17
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
@@ -5,7 +5,7 @@ import React__default, { useState, useEffect } from 'react';
|
|
|
5
5
|
import { useRouter } from 'next/router';
|
|
6
6
|
import Head from 'next/head';
|
|
7
7
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
8
|
-
import { g as getSerializers } from './index-
|
|
8
|
+
import { g as getSerializers } from './index-04817712.js';
|
|
9
9
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
10
10
|
import './core.get-iterator-method-ea258bb1.js';
|
|
11
11
|
import './_object-pie-133f504a.js';
|
|
@@ -5,7 +5,7 @@ import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
|
5
5
|
import Col from 'react-bootstrap/Col';
|
|
6
6
|
import Form from 'react-bootstrap/Form';
|
|
7
7
|
import Button from 'react-bootstrap/Button';
|
|
8
|
-
import { g as getSerializers } from './index-
|
|
8
|
+
import { g as getSerializers } from './index-04817712.js';
|
|
9
9
|
import VideoSeriesListing from './VideoSeriesListing.js';
|
|
10
10
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
11
11
|
import './core.get-iterator-method-ea258bb1.js';
|
package/dist/esm/View.js
CHANGED
|
@@ -15,7 +15,7 @@ import FormControl from 'react-bootstrap/FormControl';
|
|
|
15
15
|
import Button from 'react-bootstrap/Button';
|
|
16
16
|
import { V as VisibilitySensor } from './visibility-sensor-72fd8f8b.js';
|
|
17
17
|
import SocialShare from './SocialShare.js';
|
|
18
|
-
import { r as renderAuthor, g as getSerializers } from './index-
|
|
18
|
+
import { r as renderAuthor, g as getSerializers } from './index-04817712.js';
|
|
19
19
|
import DFPAdSlot from './AdSlot.js';
|
|
20
20
|
import { S as SeriesSlider } from './SeriesSlider-f771e20d.js';
|
|
21
21
|
import { a as getContentPlacementUrl, g as getTargeting } from './getTargeting-9bd28724.js';
|
|
@@ -1628,11 +1628,13 @@ function shouldUpdateVideo(prevProps, props) {
|
|
|
1628
1628
|
|
|
1629
1629
|
function filterResetOptions(opts) {
|
|
1630
1630
|
return _objectSpread(_objectSpread({}, opts), {}, {
|
|
1631
|
-
|
|
1631
|
+
height: 0,
|
|
1632
|
+
width: 0,
|
|
1633
|
+
playerVars: _objectSpread(_objectSpread({}, opts.playerVars), {}, {
|
|
1632
1634
|
autoplay: 0,
|
|
1633
1635
|
start: 0,
|
|
1634
1636
|
end: 0
|
|
1635
|
-
}
|
|
1637
|
+
})
|
|
1636
1638
|
});
|
|
1637
1639
|
}
|
|
1638
1640
|
/**
|
|
@@ -1647,7 +1649,7 @@ function filterResetOptions(opts) {
|
|
|
1647
1649
|
|
|
1648
1650
|
|
|
1649
1651
|
function shouldResetPlayer(prevProps, props) {
|
|
1650
|
-
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
1652
|
+
return prevProps.videoId !== props.videoId || !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
1651
1653
|
}
|
|
1652
1654
|
/**
|
|
1653
1655
|
* Check whether a props change should result in an id or className update.
|
|
@@ -1658,7 +1660,7 @@ function shouldResetPlayer(prevProps, props) {
|
|
|
1658
1660
|
|
|
1659
1661
|
|
|
1660
1662
|
function shouldUpdatePlayer(prevProps, props) {
|
|
1661
|
-
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
1663
|
+
return prevProps.id !== props.id || prevProps.className !== props.className || prevProps.opts.width !== props.opts.width || prevProps.opts.height !== props.opts.height || prevProps.title !== props.title;
|
|
1662
1664
|
}
|
|
1663
1665
|
|
|
1664
1666
|
var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
@@ -1745,6 +1747,9 @@ var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
|
1745
1747
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
1746
1748
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
1747
1749
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
1750
|
+
if (_this.props.opts && _this.props.opts.width) iframe.setAttribute('width', _this.props.opts.width);else iframe.removeAttribute('width');
|
|
1751
|
+
if (_this.props.opts && _this.props.opts.height) iframe.setAttribute('height', _this.props.opts.height);else iframe.removeAttribute('height');
|
|
1752
|
+
if (typeof _this.props.title === 'string') iframe.setAttribute('title', _this.props.title);else iframe.setAttribute('title', 'YouTube video player');
|
|
1748
1753
|
});
|
|
1749
1754
|
});
|
|
1750
1755
|
|
|
@@ -1843,7 +1848,8 @@ var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
|
1843
1848
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1844
1849
|
id: this.props.id,
|
|
1845
1850
|
className: this.props.className,
|
|
1846
|
-
ref: this.refContainer
|
|
1851
|
+
ref: this.refContainer,
|
|
1852
|
+
loading: this.props.loading
|
|
1847
1853
|
}));
|
|
1848
1854
|
}
|
|
1849
1855
|
}]);
|
|
@@ -1868,6 +1874,10 @@ YouTube.propTypes = {
|
|
|
1868
1874
|
className: PropTypes.string,
|
|
1869
1875
|
// custom class name for player container element
|
|
1870
1876
|
containerClassName: PropTypes.string,
|
|
1877
|
+
// custom title for the iFrame, see https://www.w3.org/TR/WCAG20-TECHS/H64.html
|
|
1878
|
+
title: PropTypes.string,
|
|
1879
|
+
// custom loading for player element
|
|
1880
|
+
loading: PropTypes.oneOf(['lazy', 'eager', 'auto']),
|
|
1871
1881
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
1872
1882
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
1873
1883
|
// event subscriptions
|
|
@@ -1884,6 +1894,7 @@ YouTube.defaultProps = {
|
|
|
1884
1894
|
videoId: null,
|
|
1885
1895
|
id: null,
|
|
1886
1896
|
className: null,
|
|
1897
|
+
loading: null,
|
|
1887
1898
|
opts: {},
|
|
1888
1899
|
containerClassName: '',
|
|
1889
1900
|
onReady: function onReady() {},
|
|
@@ -1893,7 +1904,8 @@ YouTube.defaultProps = {
|
|
|
1893
1904
|
onEnd: function onEnd() {},
|
|
1894
1905
|
onStateChange: function onStateChange() {},
|
|
1895
1906
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
1896
|
-
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
1907
|
+
onPlaybackQualityChange: function onPlaybackQualityChange() {},
|
|
1908
|
+
title: null
|
|
1897
1909
|
};
|
|
1898
1910
|
|
|
1899
1911
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
@@ -1999,7 +2011,7 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
1999
2011
|
return React__default.createElement(
|
|
2000
2012
|
'div',
|
|
2001
2013
|
{ id: 'fluid-video-container' },
|
|
2002
|
-
React__default.createElement(YouTube, { className: 'fluid-iframe', videoId: id, opts: opts, onReady: handleOnReady, onPlay: handleOnPlay, onPause: handleOnPause, onEnd: handleOnEnd }),
|
|
2014
|
+
React__default.createElement(YouTube, { className: 'fluid-iframe', loading: 'lazy', videoId: id, opts: opts, onReady: handleOnReady, onPlay: handleOnPlay, onPause: handleOnPause, onEnd: handleOnEnd }),
|
|
2003
2015
|
React__default.createElement(
|
|
2004
2016
|
'style',
|
|
2005
2017
|
{ jsx: 'true' },
|
|
@@ -7953,6 +7965,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7953
7965
|
{ id: 'fluid-video-container', className: 'video-block', style: { position: 'relative', overflow: 'hidden' } },
|
|
7954
7966
|
vidUrl && vidType == 'youtube' && React__default.createElement(YouTube, {
|
|
7955
7967
|
className: 'fluid-iframe',
|
|
7968
|
+
loading: 'lazy',
|
|
7956
7969
|
videoId: getYoutubeId(vidUrl),
|
|
7957
7970
|
opts: opts,
|
|
7958
7971
|
onReady: handleOnReady,
|
package/dist/esm/index.js
CHANGED
|
@@ -87,7 +87,7 @@ export { default as VerticalHero } from './VerticalHero.js';
|
|
|
87
87
|
export { default as YahooHero } from './YahooHero.js';
|
|
88
88
|
export { default as GridHero } from './GridHero.js';
|
|
89
89
|
export { default as ConferenceArticleCard } from './ConferenceArticleCard.js';
|
|
90
|
-
export { g as getSerializers } from './index-
|
|
90
|
+
export { g as getSerializers } from './index-04817712.js';
|
|
91
91
|
export { default as Beam } from './Beam.js';
|
|
92
92
|
export { default as Segment } from './Segment.js';
|
|
93
93
|
export { default as KMTracker } from './KMTracker.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mjhls/mjh-framework",
|
|
3
|
-
"version": "1.0.994-
|
|
3
|
+
"version": "1.0.994-yt-lazyloading-test",
|
|
4
4
|
"description": "Foundation Framework",
|
|
5
5
|
"author": "mjh-framework",
|
|
6
6
|
"license": "MIT",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"react-share": "^4.0.1",
|
|
79
79
|
"react-social-icons": "^4.1.0",
|
|
80
80
|
"react-visibility-sensor": "^5.1.1",
|
|
81
|
-
"react-youtube": "^7.
|
|
81
|
+
"react-youtube": "^7.14.0",
|
|
82
82
|
"rimraf": "^3.0.2",
|
|
83
83
|
"rollup": "^2.7.3",
|
|
84
84
|
"rollup-plugin-babel": "3.0.7",
|
|
@@ -112,4 +112,4 @@
|
|
|
112
112
|
"superagent": "^5.2.2",
|
|
113
113
|
"yarn": "^1.22.11"
|
|
114
114
|
}
|
|
115
|
-
}
|
|
115
|
+
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _typeof = require('./typeof-567e31ff.js');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var index = require('./index-eadd5035.js');
|
|
6
|
-
var urlFor = require('./urlFor.js');
|
|
7
|
-
var moment = require('./moment-aca40de1.js');
|
|
8
|
-
var styleInject_es = require('./style-inject.es-dcee06b6.js');
|
|
9
|
-
var BlockContent = require('./BlockContent-9ebd251f.js');
|
|
10
|
-
var getSerializers = require('./index-e9d3f910.js');
|
|
11
|
-
|
|
12
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
-
|
|
14
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
-
|
|
16
|
-
var css = ".MediaSeriesCard-module_article__SAFYK {\n width: 100%;\n margin: 0 0 1rem 0;\n}\n.MediaSeriesCard-module_article__SAFYK a {\n display: flex;\n width: 100%;\n color: #000000;\n}\n.MediaSeriesCard-module_thumb__3jRAU {\n width: 25%;\n}\n.MediaSeriesCard-module_thumb__3jRAU img {\n width: 100%;\n height: auto;\n}\n.MediaSeriesCard-module_info__3L7_o {\n width: 75%;\n font-size: 1rem;\n}\n.MediaSeriesCard-module_info__3L7_o h2 {\n font-weight: bold;\n font-size: 1.25rem;\n margin: 0;\n}\n.MediaSeriesCard-module_published__E4oiz {\n color: #6d6d6d;\n margin: 0;\n}\n.MediaSeriesCard-module_summary__1xanh {\n margin: 0.5rem 0 0 0;\n}\n.MediaSeriesCard-module_author__e5fuR {\n margin: 0;\n}\n.MediaSeriesCard-module_author__e5fuR span {\n color: #6d6d6d;\n}\n.MediaSeriesCard-module_name__2m5KY {\n font-size: 1.3rem;\n font-weight: bold;\n}\n@media only screen and (max-width: 568px) {\n .MediaSeriesCard-module_article__SAFYK {\n margin: 1rem 0;\n box-shadow: 2px 4px 8px rgba(0,0,0,.2);\n }\n .MediaSeriesCard-module_article__SAFYK a {\n flex-direction: column;\n align-items: center;\n }\n .MediaSeriesCard-module_thumb__3jRAU {\n overflow: hidden;\n width: 100%;\n margin-bottom: 1rem;\n }\n .MediaSeriesCard-module_thumb__3jRAU img{\n border-radius: 10px 10px 0 0; \n }\n .MediaSeriesCard-module_thumb__3jRAU figure {\n margin: 0;\n }\n .MediaSeriesCard-module_info__3L7_o {\n width: 90%;\n padding: 0rem !important;\n }\n .MediaSeriesCard-module_info__3L7_o h2 {\n font-size: 1rem;\n }\n .MediaSeriesCard-module_name__2m5KY {\n font-size: 1rem;\n \n }\n}\n";
|
|
17
|
-
var styles = { "article": "MediaSeriesCard-module_article__SAFYK", "thumb": "MediaSeriesCard-module_thumb__3jRAU", "info": "MediaSeriesCard-module_info__3L7_o", "published": "MediaSeriesCard-module_published__E4oiz", "summary": "MediaSeriesCard-module_summary__1xanh", "author": "MediaSeriesCard-module_author__e5fuR", "name": "MediaSeriesCard-module_name__2m5KY" };
|
|
18
|
-
styleInject_es.styleInject(css);
|
|
19
|
-
|
|
20
|
-
var MediaSeriesCard = function MediaSeriesCard(props) {
|
|
21
|
-
var data = props.data,
|
|
22
|
-
variant = props.variant,
|
|
23
|
-
defaultImage = props.defaultImage,
|
|
24
|
-
client = props.client;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return React__default['default'].createElement(
|
|
28
|
-
'div',
|
|
29
|
-
{ className: 'media-series-article ' + styles.article },
|
|
30
|
-
React__default['default'].createElement(
|
|
31
|
-
'a',
|
|
32
|
-
{ href: '/' + data.parentUrl + '/' + data.identifier.current, style: variant === 'right' ? { flexDirection: 'row-reverse' } : {} },
|
|
33
|
-
React__default['default'].createElement(
|
|
34
|
-
'div',
|
|
35
|
-
{ className: 'media-series-thumbnail ' + styles.thumb },
|
|
36
|
-
data.thumbnail && data.thumbnail.asset && React__default['default'].createElement(
|
|
37
|
-
'figure',
|
|
38
|
-
null,
|
|
39
|
-
React__default['default'].createElement(
|
|
40
|
-
index.LazyLoad,
|
|
41
|
-
null,
|
|
42
|
-
React__default['default'].createElement('img', {
|
|
43
|
-
src: data.thumbnail && data.thumbnail.asset ? urlFor({ client: client, source: data.thumbnail }) : data.thumbnail && _typeof._typeof(data.thumbnail == 'string') ? data.thumbnail : defaultImage
|
|
44
|
-
})
|
|
45
|
-
)
|
|
46
|
-
)
|
|
47
|
-
),
|
|
48
|
-
React__default['default'].createElement(
|
|
49
|
-
'div',
|
|
50
|
-
{ className: 'media-series-info ' + styles.info, style: variant === 'right' ? { padding: '0 1rem 0 0' } : { padding: ' 0 0 0 1rem' } },
|
|
51
|
-
React__default['default'].createElement(
|
|
52
|
-
'div',
|
|
53
|
-
{ className: 'media-series-name ' + styles.name },
|
|
54
|
-
data.name
|
|
55
|
-
),
|
|
56
|
-
data.published && React__default['default'].createElement(
|
|
57
|
-
'p',
|
|
58
|
-
{ className: 'media-series-published ' + styles.published },
|
|
59
|
-
moment.moment(data.published).format('MMMM Do YYYY')
|
|
60
|
-
),
|
|
61
|
-
data.authorMapping && data.authorMapping.displayName && React__default['default'].createElement(
|
|
62
|
-
'p',
|
|
63
|
-
{ className: 'media-series-author ' + styles.author },
|
|
64
|
-
'By ',
|
|
65
|
-
React__default['default'].createElement(
|
|
66
|
-
'span',
|
|
67
|
-
null,
|
|
68
|
-
data.authorMapping.displayName
|
|
69
|
-
)
|
|
70
|
-
),
|
|
71
|
-
data.description && React__default['default'].createElement(
|
|
72
|
-
'div',
|
|
73
|
-
{ className: 'media-series-desc' },
|
|
74
|
-
React__default['default'].createElement(BlockContent.BlockContent, { blocks: data.description, serializers: getSerializers.getSerializers(client) })
|
|
75
|
-
)
|
|
76
|
-
)
|
|
77
|
-
)
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
exports.MediaSeriesCard = MediaSeriesCard;
|