@mjhls/mjh-framework 1.0.816 → 1.0.817-image-crop-test-v2
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 +170 -170
- package/dist/cjs/AD.js +1 -1
- package/dist/cjs/AD300x250.js +3 -2
- package/dist/cjs/AD300x250x600.js +3 -2
- package/dist/cjs/AD728x90.js +3 -2
- package/dist/cjs/ADFloatingFooter.js +3 -2
- package/dist/cjs/ADGutter.js +3 -2
- package/dist/cjs/ADSkyscraper.js +3 -2
- package/dist/cjs/ADSponsoredResources.js +3 -2
- package/dist/cjs/ADWebcast.js +3 -2
- package/dist/cjs/ADWelcome.js +3 -2
- package/dist/cjs/AccordionPanel.js +2 -2
- package/dist/cjs/AdSlot.js +3 -2
- package/dist/cjs/AdSlotsProvider.js +3 -2
- package/dist/cjs/AlgoliaSearch.js +14099 -17
- package/dist/cjs/ArticleCarousel.js +2 -1
- package/dist/cjs/ArticleProgramLandingPage.js +7 -5
- package/dist/cjs/ArticleSeriesLandingPage.js +5 -4
- package/dist/cjs/ArticleSeriesListing.js +6 -4
- package/dist/cjs/AuthWrapper.js +1 -1
- package/dist/cjs/CMEDeck.js +3 -2
- package/dist/cjs/Column3.js +3 -2
- package/dist/cjs/ConferenceArticleCard.js +19 -24
- package/dist/cjs/DeckContent.js +20 -25
- package/dist/cjs/DeckQueue.js +11 -17
- package/dist/cjs/{Dfp-3f0ed4c8.js → Dfp-93399f8c.js} +2 -1
- package/dist/cjs/EventsDeck.js +18 -18
- package/dist/cjs/ExternalResources.js +7 -5
- package/dist/cjs/Feature.js +6 -10
- package/dist/cjs/ForbesHero.js +11 -13
- package/dist/cjs/GridContent.js +24 -29
- package/dist/cjs/GridHero.js +13 -24
- package/dist/cjs/GroupDeck.js +4 -8
- package/dist/cjs/HamMagazine.js +15 -15
- package/dist/cjs/Hero.js +3 -14
- package/dist/cjs/HorizontalArticleListing.js +7 -5
- package/dist/cjs/HorizontalHero.js +7 -8
- package/dist/cjs/IssueContentDeck.js +10 -27
- package/dist/cjs/IssueDeck.js +10 -12
- package/dist/cjs/IssueLanding.js +38 -36
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +3 -2
- package/dist/cjs/MasterDeck.js +14 -13
- package/dist/cjs/MediaSeriesLanding.js +307 -407
- package/dist/cjs/NavMagazine.js +16 -16
- package/dist/cjs/NavNative.js +12 -12
- package/dist/cjs/NavNormal.js +2 -2
- package/dist/cjs/OncliveHero.js +6 -7
- package/dist/cjs/OncliveLargeHero.js +21 -22
- package/dist/cjs/PartnerDetailListing.js +13 -16
- package/dist/cjs/PdfDownload.js +2 -2
- package/dist/cjs/PubSection.js +6 -4
- package/dist/cjs/PublicationDeck.js +10 -12
- package/dist/cjs/PublicationLanding.js +26 -29
- package/dist/cjs/QueueDeckExpanded.js +74 -72
- package/dist/cjs/RecentNews.js +5 -8
- package/dist/cjs/RelatedContent.js +35 -38
- package/dist/cjs/RelatedTopicsDropdown.js +10 -10
- package/dist/cjs/SeriesListingDeck.js +5 -3
- package/dist/cjs/{SeriesSlider-2db54929.js → SeriesSlider-8c157166.js} +7 -12
- package/dist/cjs/SideFooter.js +2 -2
- package/dist/cjs/{SocialSearchComponent-948138c7.js → SocialSearchComponent-ecb4f972.js} +3 -3
- package/dist/cjs/TaxonomyCard.js +11 -14
- package/dist/cjs/TaxonomyDescription.js +7 -5
- package/dist/cjs/TemplateNormal.js +8 -7
- package/dist/cjs/ThumbnailCard.js +6 -10
- package/dist/cjs/Ustream.js +4 -4
- package/dist/cjs/VerticalHero.js +3 -7
- package/dist/cjs/VideoProgramLandingPage.js +7 -5
- package/dist/cjs/VideoSeriesCard.js +9 -8
- package/dist/cjs/VideoSeriesLandingPage.js +6 -4
- package/dist/cjs/VideoSeriesListing.js +6 -4
- package/dist/cjs/View.js +17 -16
- package/dist/cjs/YahooHero.js +10 -12
- package/dist/cjs/YoutubeGroup.js +9 -13
- package/dist/cjs/events-1b438fe7.js +469 -0
- package/dist/cjs/getSerializers.js +7 -5
- package/dist/cjs/{getTargeting-a100d6e5.js → getTargeting-be6168ad.js} +9 -9
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/{esm/iconBase-ccc56b97.js → cjs/iconBase-68959171.js} +5 -2
- package/dist/cjs/index-8041a4eb.js +99 -0
- package/dist/cjs/{index-70971c54.js → index-8543a68a.js} +49 -93
- package/dist/cjs/{index-0e4427c8.js → index-fc2f1ca2.js} +2 -467
- package/dist/cjs/{index.esm-f27f80d9.js → index.esm-05850a2f.js} +1 -1
- package/dist/cjs/{index.esm-9225638f.js → index.esm-3b9b8952.js} +1 -1
- package/dist/cjs/{index.esm-2bb721c8.js → index.esm-8123cf40.js} +1 -1
- package/dist/cjs/{index.esm-00a6aade.js → index.esm-974f47d9.js} +1 -1
- package/dist/cjs/index.js +19 -32
- package/dist/cjs/{main-f1c77adb.js → main-025fdc78.js} +3 -3
- package/dist/cjs/urlForV2.js +35 -0
- package/dist/esm/AD.js +7 -7
- package/dist/esm/AD300x250.js +7 -6
- package/dist/esm/AD300x250x600.js +7 -6
- package/dist/esm/AD728x90.js +8 -7
- package/dist/esm/ADFloatingFooter.js +10 -9
- package/dist/esm/ADFooter.js +6 -6
- package/dist/esm/ADGutter.js +10 -9
- package/dist/esm/{ADInfeed-f7d00a9a.js → ADInfeed-7aaa47e1.js} +5 -5
- package/dist/esm/ADSkyscraper.js +10 -9
- package/dist/esm/ADSponsoredResources.js +10 -9
- package/dist/esm/ADWebcast.js +10 -9
- package/dist/esm/ADWelcome.js +14 -13
- package/dist/esm/{ADlgInfeed-db64f46d.js → ADlgInfeed-78f95e78.js} +4 -4
- package/dist/esm/AccordionPanel.js +18 -18
- package/dist/esm/AdSlot.js +6 -5
- package/dist/esm/AdSlotsProvider.js +5 -4
- package/dist/esm/AlgoliaSearch.js +14123 -41
- package/dist/esm/AlphabeticList.js +13 -13
- package/dist/esm/ArticleCarousel.js +7 -6
- package/dist/esm/ArticleProgramLandingPage.js +19 -17
- package/dist/esm/ArticleSeriesLandingPage.js +13 -12
- package/dist/esm/ArticleSeriesListing.js +33 -31
- package/dist/esm/Auth.js +70 -70
- package/dist/esm/AuthWrapper.js +26 -26
- package/dist/esm/{AuthorComponent-30aeba69.js → AuthorComponent-5ae7409f.js} +10 -10
- package/dist/esm/{BlockContent-c99c9a8d.js → BlockContent-52cf21c5.js} +3 -3
- package/dist/esm/Breadcrumbs.js +11 -11
- package/dist/esm/CMEDeck.js +62 -61
- package/dist/esm/Column1.js +5 -5
- package/dist/esm/Column2.js +12 -12
- package/dist/esm/Column3.js +24 -23
- package/dist/esm/ConferenceArticleCard.js +32 -37
- package/dist/esm/{ConferenceBanner-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
- package/dist/esm/DeckContent.js +63 -68
- package/dist/esm/DeckQueue.js +48 -54
- package/dist/esm/{Dfp-be030f2a.js → Dfp-43f121ff.js} +11 -10
- package/dist/esm/EventsDeck.js +81 -81
- package/dist/esm/ExternalResources.js +37 -35
- package/dist/esm/Feature.js +20 -24
- package/dist/esm/ForbesHero.js +31 -33
- package/dist/esm/GridContent.js +109 -114
- package/dist/esm/GridHero.js +34 -45
- package/dist/esm/GroupDeck.js +38 -42
- package/dist/esm/HamMagazine.js +95 -95
- package/dist/esm/Header.js +8 -8
- package/dist/esm/Hero.js +8 -19
- package/dist/esm/HighlightenVideo.js +14 -14
- package/dist/esm/HorizontalArticleListing.js +33 -31
- package/dist/esm/HorizontalHero.js +25 -26
- package/dist/esm/IssueContentDeck.js +48 -65
- package/dist/esm/IssueDeck.js +43 -45
- package/dist/esm/IssueLanding.js +53 -51
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/LeftNav.js +17 -16
- package/dist/esm/MasterDeck.js +48 -47
- package/dist/esm/MediaSeriesLanding.js +334 -434
- package/dist/esm/NavDvm.js +43 -43
- package/dist/esm/{NavFooter-e27bd93b.js → NavFooter-c29526b7.js} +12 -12
- package/dist/esm/NavMagazine.js +99 -99
- package/dist/esm/NavNative.js +86 -86
- package/dist/esm/NavNormal.js +22 -22
- package/dist/esm/OncliveHero.js +18 -19
- package/dist/esm/OncliveLargeHero.js +58 -59
- package/dist/esm/PageFilter.js +6 -6
- package/dist/esm/PartnerDetailListing.js +68 -71
- package/dist/esm/PdfDownload.js +7 -7
- package/dist/esm/PopUpModal.js +8 -8
- package/dist/esm/PubSection.js +16 -14
- package/dist/esm/PubToc.js +5 -5
- package/dist/esm/PublicationDeck.js +43 -45
- package/dist/esm/PublicationLanding.js +75 -78
- package/dist/esm/QueueDeckExpanded.js +262 -260
- package/dist/esm/RecentNews.js +21 -24
- package/dist/esm/RelatedContent.js +46 -49
- package/dist/esm/RelatedTopicsDropdown.js +21 -21
- package/dist/esm/RolesDeck.js +13 -13
- package/dist/esm/Search.js +5 -5
- package/dist/esm/SeriesListingDeck.js +21 -19
- package/dist/esm/{SeriesSlider-c8477bf3.js → SeriesSlider-bfd7299d.js} +25 -30
- package/dist/esm/SideFooter.js +21 -21
- package/dist/esm/SocialIcons.js +7 -7
- package/dist/esm/{SocialSearchComponent-db963c3e.js → SocialSearchComponent-cd38ae60.js} +22 -22
- package/dist/esm/SocialShare.js +25 -25
- package/dist/esm/TaxonomyCard.js +43 -46
- package/dist/esm/TaxonomyDescription.js +15 -13
- package/dist/esm/TemplateNormal.js +31 -30
- package/dist/esm/ThumbnailCard.js +11 -15
- package/dist/esm/Ustream.js +18 -18
- package/dist/esm/VerticalHero.js +14 -18
- package/dist/esm/VideoProgramLandingPage.js +26 -24
- package/dist/esm/VideoSeriesCard.js +19 -18
- package/dist/esm/VideoSeriesFilter.js +6 -6
- package/dist/esm/VideoSeriesLandingPage.js +14 -12
- package/dist/esm/VideoSeriesListing.js +49 -47
- package/dist/esm/View.js +178 -177
- package/dist/esm/YahooHero.js +28 -30
- package/dist/esm/YoutubeGroup.js +36 -40
- package/dist/esm/{brightcove-react-player-loader.es-57a70a56.js → brightcove-react-player-loader.es-b43c695a.js} +3 -3
- package/dist/esm/events-6c3a7a63.js +467 -0
- package/dist/esm/getSerializers.js +10 -8
- package/dist/esm/{getTargeting-05c216d6.js → getTargeting-68291ce9.js} +9 -9
- package/dist/esm/getTargeting.js +1 -1
- package/dist/{cjs/iconBase-be4097c0.js → esm/iconBase-602d52fe.js} +8 -33
- package/dist/esm/{index-5cc7b406.js → index-2446af28.js} +4 -469
- package/dist/esm/{index-755f2cc2.js → index-35bdcc81.js} +4 -4
- package/dist/esm/index-67e1773f.js +94 -0
- package/dist/esm/{index-a30e3b71.js → index-d1638f9e.js} +357 -401
- package/dist/esm/{index.es-a6137319.js → index.es-c6222053.js} +5 -5
- package/dist/esm/{index.esm-f6156a57.js → index.esm-3fdda599.js} +1 -1
- package/dist/esm/{index.esm-37268dca.js → index.esm-8016b507.js} +16 -16
- package/dist/esm/{index.esm-d4932dea.js → index.esm-a8ff922c.js} +1 -1
- package/dist/esm/{index.esm-e874e770.js → index.esm-d6f88d94.js} +1 -1
- package/dist/esm/index.js +43 -55
- package/dist/esm/{main-d4165069.js → main-b5c5aac1.js} +19 -19
- package/dist/esm/{react-social-icons-9be47857.js → react-social-icons-91f9716f.js} +5 -5
- package/dist/esm/urlForV2.js +33 -0
- package/dist/esm/{visibility-sensor-72fd8f8b.js → visibility-sensor-f40c2564.js} +2 -2
- package/package.json +110 -110
- /package/dist/cjs/{ADInfeed-7cf51090.js → ADInfeed-1ac86856.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-bf24708d.js → ADlgInfeed-2ee46b09.js} +0 -0
package/dist/esm/GridHero.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { m as moment } from './moment-bc12cb97.js';
|
|
3
|
-
import
|
|
3
|
+
import urlFor from './urlForV2.js';
|
|
4
4
|
import { c as clean_html_1 } from './entities-932b50cf.js';
|
|
5
|
-
import { L as LazyLoad } from './index-
|
|
6
|
-
import { A as AuthorComponent } from './AuthorComponent-
|
|
5
|
+
import { L as LazyLoad } from './index-35bdcc81.js';
|
|
6
|
+
import { A as AuthorComponent } from './AuthorComponent-5ae7409f.js';
|
|
7
7
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
8
|
+
import './index-0dbff1d1.js';
|
|
8
9
|
import 'react-dom';
|
|
9
10
|
import 'prop-types';
|
|
10
11
|
import './slicedToArray-be2f7a22.js';
|
|
@@ -19,120 +20,108 @@ var GridHero = function GridHero(props) {
|
|
|
19
20
|
|
|
20
21
|
var client = props.client,
|
|
21
22
|
_props$topWidth = props.topWidth,
|
|
22
|
-
topWidth = _props$topWidth === undefined ? 600 : _props$topWidth
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
_props$subHeight = props.subHeight,
|
|
26
|
-
subHeight = _props$subHeight === undefined ? 270 : _props$subHeight;
|
|
23
|
+
topWidth = _props$topWidth === undefined ? 600 : _props$topWidth;
|
|
24
|
+
props.subWidth;
|
|
25
|
+
props.subHeight;
|
|
27
26
|
|
|
28
|
-
var builder = imageUrlBuilder(client);
|
|
29
|
-
function urlFor(source) {
|
|
30
|
-
var imageWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
31
|
-
var imageHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
32
|
-
|
|
33
|
-
var url = builder.image(source);
|
|
34
|
-
if (imageWidth) url = url.width(imageWidth);
|
|
35
|
-
if (imageHeight) url = url.height(imageHeight);
|
|
36
|
-
return url.auto('format').url();
|
|
37
|
-
}
|
|
38
27
|
|
|
39
28
|
var topArticleThumbnail = '';
|
|
40
29
|
var topArticleAltText = topArticle.title;
|
|
41
30
|
if (topArticle.thumbnail && topArticle.thumbnail.asset) {
|
|
42
|
-
topArticleThumbnail = urlFor(topArticle.thumbnail.asset, topWidth);
|
|
31
|
+
topArticleThumbnail = urlFor({ client: client, source: topArticle.thumbnail.asset, imageWidth: topWidth });
|
|
43
32
|
topArticleAltText = topArticle.thumbnail.asset.originalFileName;
|
|
44
33
|
} else if (props.thumbnail) {
|
|
45
34
|
topArticleThumbnail = props.thumbnail;
|
|
46
35
|
}
|
|
47
36
|
|
|
48
|
-
return
|
|
37
|
+
return React.createElement(
|
|
49
38
|
'div',
|
|
50
39
|
{ className: 'article-hero' },
|
|
51
|
-
|
|
40
|
+
React.createElement(
|
|
52
41
|
'div',
|
|
53
42
|
{ className: 'grid-top-article' },
|
|
54
|
-
topArticleThumbnail &&
|
|
43
|
+
topArticleThumbnail && React.createElement(
|
|
55
44
|
'a',
|
|
56
45
|
{ href: '/view/' + topArticle.url.current },
|
|
57
|
-
|
|
46
|
+
React.createElement(
|
|
58
47
|
'div',
|
|
59
48
|
{ className: 'grid-top-article--img' },
|
|
60
|
-
|
|
49
|
+
React.createElement('img', { src: topArticleThumbnail, alt: topArticleAltText })
|
|
61
50
|
)
|
|
62
51
|
),
|
|
63
|
-
|
|
52
|
+
React.createElement(
|
|
64
53
|
'div',
|
|
65
54
|
{ className: 'grid-top-article--body' },
|
|
66
|
-
|
|
55
|
+
React.createElement(
|
|
67
56
|
'a',
|
|
68
57
|
{ href: '/view/' + topArticle.url.current },
|
|
69
|
-
|
|
58
|
+
React.createElement(
|
|
70
59
|
'h1',
|
|
71
60
|
null,
|
|
72
61
|
topArticle.title
|
|
73
62
|
)
|
|
74
63
|
),
|
|
75
|
-
|
|
64
|
+
React.createElement(
|
|
76
65
|
'p',
|
|
77
66
|
{ className: 'article-date' },
|
|
78
67
|
moment(topArticle.published).format('MMMM DD, YYYY ')
|
|
79
68
|
),
|
|
80
|
-
topArticle.authorMapping && topArticle.authorMapping.length > 0 &&
|
|
69
|
+
topArticle.authorMapping && topArticle.authorMapping.length > 0 && React.createElement(
|
|
81
70
|
LazyLoad,
|
|
82
71
|
{ height: 50 },
|
|
83
|
-
|
|
72
|
+
React.createElement(AuthorComponent, { key: topArticle.url.current, index: topArticle.url.current, authors: topArticle.authorMapping })
|
|
84
73
|
),
|
|
85
|
-
topArticle.summary &&
|
|
74
|
+
topArticle.summary && React.createElement(
|
|
86
75
|
'p',
|
|
87
76
|
{ className: 'top-article-summary' },
|
|
88
77
|
clean_html_1(topArticle.summary)
|
|
89
78
|
)
|
|
90
79
|
)
|
|
91
80
|
),
|
|
92
|
-
|
|
81
|
+
React.createElement(
|
|
93
82
|
'div',
|
|
94
83
|
{ className: 'grid-sub-article-container' },
|
|
95
84
|
subArticles.map(function (article, index) {
|
|
96
85
|
var articleThumbnail = '';
|
|
97
86
|
var articleAltText = article.title;
|
|
98
87
|
if (article.thumbnail && article.thumbnail.asset) {
|
|
99
|
-
articleThumbnail = urlFor(article.thumbnail.asset
|
|
88
|
+
articleThumbnail = urlFor(article.thumbnail.asset);
|
|
100
89
|
articleAltText = article.thumbnail.asset.originalFileName;
|
|
101
90
|
} else if (props.thumbnail) {
|
|
102
91
|
articleThumbnail = props.thumbnail;
|
|
103
92
|
}
|
|
104
93
|
|
|
105
|
-
return
|
|
94
|
+
return React.createElement(
|
|
106
95
|
'div',
|
|
107
96
|
{ key: index, className: 'grid-sub-article sub-grid-' + (index + 1) },
|
|
108
|
-
articleThumbnail &&
|
|
97
|
+
articleThumbnail && React.createElement(
|
|
109
98
|
'a',
|
|
110
99
|
{ href: '/view/' + article.url.current },
|
|
111
|
-
|
|
100
|
+
React.createElement('img', { src: articleThumbnail, alt: articleAltText })
|
|
112
101
|
),
|
|
113
|
-
|
|
102
|
+
React.createElement(
|
|
114
103
|
'div',
|
|
115
104
|
{ className: 'grid-sub-article-body' },
|
|
116
|
-
|
|
105
|
+
React.createElement(
|
|
117
106
|
'a',
|
|
118
107
|
{ href: '/view/' + article.url.current },
|
|
119
|
-
|
|
108
|
+
React.createElement(
|
|
120
109
|
'h2',
|
|
121
110
|
{ className: 'grid-sub-article--title' },
|
|
122
111
|
article.title
|
|
123
112
|
)
|
|
124
113
|
),
|
|
125
|
-
|
|
114
|
+
React.createElement(
|
|
126
115
|
'p',
|
|
127
116
|
{ className: 'article-date' },
|
|
128
117
|
moment(article.published).format('MMMM DD, YYYY ')
|
|
129
118
|
),
|
|
130
|
-
article.authorMapping && article.authorMapping.length > 0 &&
|
|
119
|
+
article.authorMapping && article.authorMapping.length > 0 && React.createElement(
|
|
131
120
|
LazyLoad,
|
|
132
121
|
{ height: 50 },
|
|
133
|
-
|
|
122
|
+
React.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
|
|
134
123
|
),
|
|
135
|
-
article.summary &&
|
|
124
|
+
article.summary && React.createElement(
|
|
136
125
|
'p',
|
|
137
126
|
{ className: 'sub-article-summary' },
|
|
138
127
|
clean_html_1(article.summary)
|
|
@@ -141,7 +130,7 @@ var GridHero = function GridHero(props) {
|
|
|
141
130
|
);
|
|
142
131
|
})
|
|
143
132
|
),
|
|
144
|
-
|
|
133
|
+
React.createElement(
|
|
145
134
|
'style',
|
|
146
135
|
{ jsx: 'true' },
|
|
147
136
|
'\n .article-hero {\n margin-bottom: 1rem;\n border-bottom: 1px solid #ddd;\n padding-bottom: 0.5rem;\n margin-left: 15px;\n margin-right: 15px;\n }\n .grid-top-article {\n width: 100%;\n margin-bottom: 1rem;\n padding-bottom: 1rem;\n border-bottom: 5px solid var(--primary);\n box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.2);\n }\n .grid-top-article img {\n width: 100%;\n\n max-height: 300px;\n min-height: 275px;\n object-fit: cover;\n height: 112.5px;\n }\n\n .grid-top-article--body {\n padding: 1.25rem;\n }\n .grid-top-article--body h1 {\n color: #373a3c !important;\n margin-bottom: 0.25rem !important;\n font-weight: 600 !important;\n font-size: 1.6rem;\n font-size: 1.40625rem;\n line-height: 1.2;\n }\n .grid-top-article--body p {\n margin-bottom: 0;\n color: #252525;\n }\n\n .grid-sub-article-container {\n display: flex;\n flex-direction: row;\n padding-top: 1rem;\n }\n .grid-sub-article {\n width: 48%;\n margin-bottom: 1.75rem;\n }\n .grid-sub-article-body {\n padding: 1.25rem;\n }\n @media screen and (min-width: 992px) {\n .sub-grid-1 {\n margin-right: 2%;\n }\n .sub-grid-2 {\n margin-left: 2%;\n }\n }\n .grid-sub-article img {\n margin-right: 1rem;\n width: 100%;\n max-height: 240px;\n object-fit: contain;\n }\n .grid-sub-article p {\n margin-bottom: 0;\n\n color: #373a3c;\n }\n .grid-sub-article .grid-sub-article--title {\n color: #373a3c !important;\n margin-bottom: 0.25rem !important;\n font-weight: 600 !important;\n font-size: 1.6rem;\n font-size: 1.40625rem;\n line-height: 1.2;\n }\n .author-text {\n font-size: 0.9375rem;\n font-weight: 400;\n line-height: 1.5;\n }\n .author-text > span {\n color: #868e96 !important;\n }\n .article-date {\n font-style: italic;\n }\n .top-article-summary,\n .sub-article-summary {\n margin-top: 0.5rem;\n }\n\n @media screen and (max-width: 992px) {\n .grid-sub-article-container {\n flex-direction: column;\n }\n .grid-sub-article {\n width: 100%;\n }\n }\n '
|
package/dist/esm/GroupDeck.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { _ as _typeof } from './typeof-a286cf0c.js';
|
|
2
2
|
import { _ as _slicedToArray } from './slicedToArray-be2f7a22.js';
|
|
3
|
-
import
|
|
3
|
+
import React, { useRef, useState, useEffect } from 'react';
|
|
4
4
|
import { g as getYoutubeId } from './index-c7e2ac95.js';
|
|
5
5
|
import { s as smoothscroll } from './smoothscroll-fa4e3f8c.js';
|
|
6
|
-
import
|
|
6
|
+
import urlFor from './urlForV2.js';
|
|
7
7
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
8
8
|
import './es6.string.iterator-bc33758b.js';
|
|
9
9
|
import './_to-object-b50e61c3.js';
|
|
@@ -12,6 +12,7 @@ import './_is-array-3e99e06e.js';
|
|
|
12
12
|
import './_object-pie-133f504a.js';
|
|
13
13
|
import './_library-528f1934.js';
|
|
14
14
|
import './core.get-iterator-method-133dfacd.js';
|
|
15
|
+
import './index-0dbff1d1.js';
|
|
15
16
|
|
|
16
17
|
var GroupDeck = function GroupDeck(props) {
|
|
17
18
|
// Props should be an array of objects containing Thumbnail, title, and URL
|
|
@@ -34,11 +35,6 @@ var GroupDeck = function GroupDeck(props) {
|
|
|
34
35
|
scrollPosition = _useState6[0],
|
|
35
36
|
setScrollPosition = _useState6[1];
|
|
36
37
|
|
|
37
|
-
var urlFor = function urlFor(source, client) {
|
|
38
|
-
var builder = imageUrlBuilder(client);
|
|
39
|
-
return builder.image(source).auto('format');
|
|
40
|
-
};
|
|
41
|
-
|
|
42
38
|
useEffect(function () {
|
|
43
39
|
//IE11 Polyfill
|
|
44
40
|
smoothscroll.polyfill();
|
|
@@ -134,27 +130,27 @@ var GroupDeck = function GroupDeck(props) {
|
|
|
134
130
|
displayEpisodeNumber = _props$displayEpisode === undefined ? false : _props$displayEpisode;
|
|
135
131
|
|
|
136
132
|
|
|
137
|
-
return
|
|
133
|
+
return React.createElement(
|
|
138
134
|
'div',
|
|
139
135
|
{ ref: viewableWindow, id: 'vid-slider', className: 'col' },
|
|
140
|
-
|
|
136
|
+
React.createElement(
|
|
141
137
|
'div',
|
|
142
138
|
{ className: 'row' },
|
|
143
|
-
showScroller && showScroller &&
|
|
139
|
+
showScroller && showScroller && React.createElement(
|
|
144
140
|
'div',
|
|
145
141
|
{ onClick: function onClick(e) {
|
|
146
142
|
return scrollSlider(e, 'prev');
|
|
147
143
|
}, className: 'tile__slider-prev', style: { color: variant } },
|
|
148
|
-
|
|
144
|
+
React.createElement('i', { style: { border: 'solid ' + variant, borderWidth: '0 4px 4px 0' }, className: 'arrow left' })
|
|
149
145
|
),
|
|
150
|
-
showScroller && showScroller &&
|
|
146
|
+
showScroller && showScroller && React.createElement(
|
|
151
147
|
'div',
|
|
152
148
|
{ onClick: function onClick(e) {
|
|
153
149
|
return scrollSlider(e, 'next');
|
|
154
150
|
}, className: 'tile__slider-next', style: { color: variant } },
|
|
155
|
-
|
|
151
|
+
React.createElement('i', { style: { border: 'solid ' + variant, borderWidth: '0 4px 4px 0' }, className: 'arrow right' })
|
|
156
152
|
),
|
|
157
|
-
|
|
153
|
+
React.createElement(
|
|
158
154
|
'div',
|
|
159
155
|
{ ref: innerSlider, className: 'row__inner' },
|
|
160
156
|
props.dataset && props.dataset.map(function (video, index) {
|
|
@@ -164,44 +160,44 @@ var GroupDeck = function GroupDeck(props) {
|
|
|
164
160
|
var thumbnail = void 0;
|
|
165
161
|
|
|
166
162
|
if (video.thumbnail && video.thumbnail.asset) {
|
|
167
|
-
thumbnail = urlFor(video.thumbnail, props.client);
|
|
163
|
+
thumbnail = urlFor({ source: video.thumbnail, client: props.client });
|
|
168
164
|
} else if (_typeof(video.thumbnail == 'string')) {
|
|
169
165
|
thumbnail = video.thumbnail;
|
|
170
166
|
} else {
|
|
171
167
|
thumbnail = 'https://img.youtube.com/vi/' + getYoutubeId(video.url) + '/hqdefault.jpg';
|
|
172
168
|
}
|
|
173
169
|
|
|
174
|
-
return
|
|
170
|
+
return React.createElement(
|
|
175
171
|
'div',
|
|
176
172
|
{ ref: tile, key: video.title, className: 'tile', style: { width: tileSize + 'px' } },
|
|
177
|
-
current && current === url ?
|
|
173
|
+
current && current === url ? React.createElement(
|
|
178
174
|
'div',
|
|
179
175
|
{ className: 'now-playing' },
|
|
180
176
|
'Now Playing'
|
|
181
177
|
) : '',
|
|
182
|
-
|
|
178
|
+
React.createElement(
|
|
183
179
|
'a',
|
|
184
180
|
{ onClick: function onClick() {
|
|
185
181
|
return handleClick(url, thumbnail, index + 1);
|
|
186
182
|
} },
|
|
187
|
-
|
|
183
|
+
React.createElement(
|
|
188
184
|
'div',
|
|
189
185
|
{ className: 'tile__media' },
|
|
190
|
-
|
|
186
|
+
React.createElement('img', { className: 'tile__img', src: thumbnail, style: { width: tileSize + 'px' }, alt: '' })
|
|
191
187
|
),
|
|
192
|
-
|
|
188
|
+
React.createElement(
|
|
193
189
|
'div',
|
|
194
190
|
{ className: 'tile__details' },
|
|
195
|
-
|
|
191
|
+
React.createElement(
|
|
196
192
|
'div',
|
|
197
193
|
{ className: 'tile__title' },
|
|
198
|
-
|
|
194
|
+
React.createElement(
|
|
199
195
|
'div',
|
|
200
196
|
{ style: { color: variant }, className: 'tile__title_text' },
|
|
201
|
-
displayEpisodeNumber ?
|
|
197
|
+
displayEpisodeNumber ? React.createElement(
|
|
202
198
|
'span',
|
|
203
199
|
null,
|
|
204
|
-
|
|
200
|
+
React.createElement(
|
|
205
201
|
'b',
|
|
206
202
|
null,
|
|
207
203
|
'EP. ',
|
|
@@ -214,13 +210,13 @@ var GroupDeck = function GroupDeck(props) {
|
|
|
214
210
|
)
|
|
215
211
|
)
|
|
216
212
|
),
|
|
217
|
-
|
|
213
|
+
React.createElement(
|
|
218
214
|
'div',
|
|
219
215
|
{ style: { color: '#323232' }, className: 'tile__info' },
|
|
220
|
-
displayEpisodeNumber ?
|
|
216
|
+
displayEpisodeNumber ? React.createElement(
|
|
221
217
|
'span',
|
|
222
218
|
null,
|
|
223
|
-
|
|
219
|
+
React.createElement(
|
|
224
220
|
'b',
|
|
225
221
|
null,
|
|
226
222
|
'EP. ',
|
|
@@ -238,36 +234,36 @@ var GroupDeck = function GroupDeck(props) {
|
|
|
238
234
|
var _url = '' + video.link;
|
|
239
235
|
var _thumbnail = void 0;
|
|
240
236
|
if (video.thumbnail && video.thumbnail.asset) {
|
|
241
|
-
_thumbnail = urlFor(video.thumbnail, props.client);
|
|
237
|
+
_thumbnail = urlFor({ source: video.thumbnail, client: props.client });
|
|
242
238
|
} else if (_typeof(video.thumbnail == 'string')) {
|
|
243
239
|
_thumbnail = video.thumbnail;
|
|
244
240
|
} else {
|
|
245
241
|
_thumbnail = 'https://img.youtube.com/vi/' + getYoutubeId(video.url) + '/hqdefault.jpg';
|
|
246
242
|
}
|
|
247
|
-
return
|
|
243
|
+
return React.createElement(
|
|
248
244
|
'div',
|
|
249
245
|
{ ref: tile, key: index, className: 'tile', style: { width: tileSize + 'px' } },
|
|
250
|
-
|
|
246
|
+
React.createElement(
|
|
251
247
|
'a',
|
|
252
248
|
{ href: _url },
|
|
253
|
-
|
|
249
|
+
React.createElement(
|
|
254
250
|
'div',
|
|
255
251
|
{ className: 'tile__media' },
|
|
256
|
-
|
|
252
|
+
React.createElement('img', { className: 'tile__img', src: _thumbnail, alt: '', style: { width: tileSize + 'px' } })
|
|
257
253
|
),
|
|
258
|
-
|
|
254
|
+
React.createElement(
|
|
259
255
|
'div',
|
|
260
256
|
{ className: 'tile__details' },
|
|
261
|
-
|
|
257
|
+
React.createElement(
|
|
262
258
|
'div',
|
|
263
259
|
{ className: 'tile__title' },
|
|
264
|
-
|
|
260
|
+
React.createElement(
|
|
265
261
|
'div',
|
|
266
262
|
{ style: { color: '#323232' }, className: 'tile__title_text' },
|
|
267
|
-
displayEpisodeNumber ?
|
|
263
|
+
displayEpisodeNumber ? React.createElement(
|
|
268
264
|
'span',
|
|
269
265
|
null,
|
|
270
|
-
|
|
266
|
+
React.createElement(
|
|
271
267
|
'b',
|
|
272
268
|
null,
|
|
273
269
|
'EP. ',
|
|
@@ -280,13 +276,13 @@ var GroupDeck = function GroupDeck(props) {
|
|
|
280
276
|
)
|
|
281
277
|
)
|
|
282
278
|
),
|
|
283
|
-
|
|
279
|
+
React.createElement(
|
|
284
280
|
'div',
|
|
285
281
|
{ style: { color: variant }, className: 'tile__info' },
|
|
286
|
-
displayEpisodeNumber ?
|
|
282
|
+
displayEpisodeNumber ? React.createElement(
|
|
287
283
|
'span',
|
|
288
284
|
null,
|
|
289
|
-
|
|
285
|
+
React.createElement(
|
|
290
286
|
'b',
|
|
291
287
|
null,
|
|
292
288
|
'EP. ',
|
|
@@ -303,7 +299,7 @@ var GroupDeck = function GroupDeck(props) {
|
|
|
303
299
|
})
|
|
304
300
|
)
|
|
305
301
|
),
|
|
306
|
-
|
|
302
|
+
React.createElement(
|
|
307
303
|
'style',
|
|
308
304
|
{ jsx: 'true' },
|
|
309
305
|
'\n #vid-slider * {\n box-sizing: border-box;\n -ms-overflow-style: none;\n }\n #vid-slider::-webkit-scrollbar-thumb {\n display: none;\n }\n #vid-slider::-webkit-scrollbar {\n display: none;\n }\n #vid-slider .row::-webkit-scrollbar {\n display: none;\n }\n #vid-slider .row::-webkit-scrollbar-thumb {\n display: none;\n }\n #vid-slider {\n position: relative;\n -ms-overflow-style: none;\n padding: 0 1.5rem;\n margin-bottom: 0 !important;\n }\n #vid-slider .now-playing {\n position: absolute;\n top: 0.5rem;\n left: 1rem;\n color: white;\n background: rgba(0, 0, 0, 0.75);\n }\n #vid-slider h1,\n #vid-slider p {\n text-align: center;\n width: 100%;\n max-width: 500px;\n margin: auto;\n }\n #vid-slider,\n #vidHolder {\n max-width: 805px;\n }\n #vid-slider a:link,\n #vid-slider a:hover,\n #vid-slider a:active,\n #vid-slider a:visited {\n transition: color 150ms;\n color: #95a5a6;\n text-decoration: none;\n }\n #vid-slider a:hover {\n color: #7f8c8d;\n text-decoration: underline;\n }\n #vid-slider .contain {\n width: 100%;\n }\n #vid-slider .row {\n overflow-x: scroll;\n width: 100%;\n -ms-overflow-style: none;\n overflow-y: hidden !important;\n }\n #vid-slider .tile__info {\n white-space: normal !important;\n position: absolute;\n text-align: center;\n color: ' + (props.dark ? 'white' : '#383838') + ';\n opacity: 1;\n font-size: 0.9rem;\n font-weight: bold;\n transition: opacity 0.25s;\n }\n #vid-slider .row__inner {\n transition: 450ms -webkit-transform;\n transition: 450ms transform;\n transition: 450ms transform, 450ms -webkit-transform;\n font-size: 0;\n white-space: nowrap;\n margin: 25px 0 70px !important;\n padding-bottom: 10px;\n padding-left: 0;\n }\n #vid-slider .tile {\n position: relative;\n display: inline-block;\n\n margin: 0 12px;\n font-size: 20px;\n cursor: pointer;\n transition: 450ms all;\n -webkit-transform-origin: center left;\n transform-origin: center left;\n }\n\n #vid-slider .tile:first-child {\n margin-left: 15px;\n }\n #vid-slider .tile__img {\n height: auto;\n -o-object-fit: contain;\n object-fit: contain;\n object-position: center;\n }\n #vid-slider .tile__details {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n font-size: 10px;\n opacity: 0;\n background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);\n transition: 450ms opacity;\n }\n #vid-slider .tile__details:after,\n #vid-slider .tile__details:before {\n content: \'\';\n\n position: absolute;\n top: 50%;\n left: 50%;\n display: #000;\n }\n #vid-slider .tile__details:after {\n margin-top: -25px;\n margin-left: -25px;\n width: 50px;\n height: 50px;\n border: 3px solid #ecf0f1;\n line-height: 50px;\n text-align: center;\n border-radius: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1;\n }\n #vid-slider .tile__details:before {\n content: \'\';\n background: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 64 64\' width=\'64\' height=\'64\' fill=\'white\'><path d=\'M26 46 L46 32 L26 18 Z\'/></svg>")\n no-repeat center center;\n left: 0;\n width: 100%;\n height: 3rem;\n font-size: 30px;\n margin-right: 12px;\n margin-top: -24px;\n text-align: center;\n z-index: 2;\n color: white;\n }\n\n #vid-slider .tile__title {\n position: absolute;\n bottom: 0;\n padding: 10px;\n max-width: 250px;\n }\n #vid-slider .tile__title_text {\n position: relative;\n left: 0;\n white-space: normal;\n }\n\n #vid-slider .tile__slider-prev,\n #vid-slider .tile__slider-next {\n width: 30px;\n background: transparent;\n border: none;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n z-index: 99;\n cursor: pointer;\n color: ' + (props.dark ? 'white' : 'black') + ';\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 2rem;\n }\n #vid-slider .tile__slider-prev {\n left: -0.5rem;\n padding: 1rem;\n }\n #vid-slider .tile__slider-next {\n right: -0.5rem;\n padding: 1rem;\n }\n #vid-slider,\n #vid-slider .row {\n margin: 0;\n }\n\n #vid-slider .row::-webkit-scrollbar-thumb {\n background-color: transparent !important;\n }\n #vid-slider i {\n border: solid ' + (props.dark ? 'white' : 'black') + ';\n border-width: 0 4px 4px 0;\n display: inline-block;\n padding: 4px;\n pointer-events: none;\n }\n #vid-slider .right {\n transform: rotate(-45deg);\n -webkit-transform: rotate(-45deg);\n }\n #vid-slider .left {\n transform: rotate(135deg);\n -webkit-transform: rotate(135deg);\n }\n @media screen and (min-width: 1399px) {\n .block-content #vid-slider .tile__img {\n height: auto;\n }\n .block-content #vid-slider .tile {\n height: auto;\n }\n }\n\n @media screen and (max-width: 1399px) {\n #vid-slider,\n #vidHolder {\n max-width: 620px;\n }\n }\n @media screen and (max-width: 1200px) {\n #vid-slider,\n #vidHolder {\n max-width: 580px;\n }\n }\n @media screen and (max-width: 967px) {\n #vid-slider {\n max-width: 100%;\n }\n\n #vid-slider .row__inner {\n margin: 60px 0 50px !important;\n }\n }\n\n @media screen and (max-width: 768px) {\n #vidHolder {\n position: unset;\n width: 100%;\n }\n }\n @media screen and (max-width: 568px) {\n #vidHolder {\n position: unset;\n width: 100%;\n }\n\n #vid-slider .row__inner {\n margin: 30px 0 70px;\n }\n }\n '
|