@mjhls/mjh-framework 1.0.817-image-crop-test-v4 → 1.0.818

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 (98) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/AlgoliaSearch.js +5 -6
  3. package/dist/cjs/ArticleCarousel.js +0 -1
  4. package/dist/cjs/ArticleProgramLandingPage.js +1 -2
  5. package/dist/cjs/ArticleSeriesListing.js +0 -1
  6. package/dist/cjs/ConferenceArticleCard.js +9 -4
  7. package/dist/cjs/DeckContent.js +15 -9
  8. package/dist/cjs/DeckQueue.js +16 -9
  9. package/dist/cjs/ExternalResources.js +1 -2
  10. package/dist/cjs/Feature.js +9 -5
  11. package/dist/cjs/ForbesHero.js +14 -12
  12. package/dist/cjs/GridContent.js +26 -20
  13. package/dist/cjs/GridHero.js +19 -10
  14. package/dist/cjs/GroupDeck.js +8 -4
  15. package/dist/cjs/HamMagazine.js +21 -11
  16. package/dist/cjs/Hero.js +14 -3
  17. package/dist/cjs/HorizontalArticleListing.js +1 -2
  18. package/dist/cjs/HorizontalHero.js +6 -5
  19. package/dist/cjs/IssueContentDeck.js +27 -10
  20. package/dist/cjs/IssueDeck.js +12 -10
  21. package/dist/cjs/IssueLanding.js +1 -2
  22. package/dist/cjs/MasterDeck.js +1 -1
  23. package/dist/cjs/MediaSeriesLanding.js +6 -6
  24. package/dist/cjs/OncliveHero.js +6 -5
  25. package/dist/cjs/OncliveLargeHero.js +22 -21
  26. package/dist/cjs/PartnerDetailListing.js +10 -6
  27. package/dist/cjs/PubSection.js +0 -1
  28. package/dist/cjs/PublicationDeck.js +12 -10
  29. package/dist/cjs/PublicationLanding.js +5 -2
  30. package/dist/cjs/QueueDeckExpanded.js +69 -70
  31. package/dist/cjs/RecentNews.js +6 -3
  32. package/dist/cjs/RelatedContent.js +10 -7
  33. package/dist/cjs/SeriesListingDeck.js +1 -2
  34. package/dist/cjs/{SeriesSlider-d54fa925.js → SeriesSlider-c022ce04.js} +7 -2
  35. package/dist/cjs/TaxonomyCard.js +14 -11
  36. package/dist/cjs/TaxonomyDescription.js +1 -2
  37. package/dist/cjs/ThumbnailCard.js +10 -6
  38. package/dist/cjs/VerticalHero.js +7 -3
  39. package/dist/cjs/VideoProgramLandingPage.js +1 -2
  40. package/dist/cjs/VideoSeriesCard.js +7 -8
  41. package/dist/cjs/VideoSeriesLandingPage.js +0 -1
  42. package/dist/cjs/VideoSeriesListing.js +1 -2
  43. package/dist/cjs/View.js +9 -9
  44. package/dist/cjs/YahooHero.js +13 -11
  45. package/dist/cjs/YoutubeGroup.js +8 -4
  46. package/dist/cjs/getSerializers.js +1 -2
  47. package/dist/cjs/{index-55c6de08.js → index-e5fd35c7.js} +91 -47
  48. package/dist/cjs/index.js +20 -6
  49. package/dist/cjs/urlFor.js +2 -34
  50. package/dist/esm/AlgoliaSearch.js +3 -4
  51. package/dist/esm/ArticleCarousel.js +0 -1
  52. package/dist/esm/ArticleProgramLandingPage.js +1 -2
  53. package/dist/esm/ArticleSeriesListing.js +0 -1
  54. package/dist/esm/ConferenceArticleCard.js +9 -4
  55. package/dist/esm/DeckContent.js +11 -5
  56. package/dist/esm/DeckQueue.js +12 -5
  57. package/dist/esm/ExternalResources.js +1 -2
  58. package/dist/esm/Feature.js +9 -5
  59. package/dist/esm/ForbesHero.js +8 -6
  60. package/dist/esm/GridContent.js +11 -5
  61. package/dist/esm/GridHero.js +13 -4
  62. package/dist/esm/GroupDeck.js +8 -4
  63. package/dist/esm/HamMagazine.js +21 -11
  64. package/dist/esm/Hero.js +14 -3
  65. package/dist/esm/HorizontalArticleListing.js +1 -2
  66. package/dist/esm/HorizontalHero.js +6 -5
  67. package/dist/esm/IssueContentDeck.js +27 -10
  68. package/dist/esm/IssueDeck.js +12 -10
  69. package/dist/esm/IssueLanding.js +1 -2
  70. package/dist/esm/MasterDeck.js +1 -1
  71. package/dist/esm/MediaSeriesLanding.js +4 -4
  72. package/dist/esm/OncliveHero.js +6 -5
  73. package/dist/esm/OncliveLargeHero.js +9 -8
  74. package/dist/esm/PartnerDetailListing.js +10 -6
  75. package/dist/esm/PubSection.js +0 -1
  76. package/dist/esm/PublicationDeck.js +12 -10
  77. package/dist/esm/PublicationLanding.js +5 -2
  78. package/dist/esm/QueueDeckExpanded.js +20 -21
  79. package/dist/esm/RecentNews.js +6 -3
  80. package/dist/esm/RelatedContent.js +6 -3
  81. package/dist/esm/SeriesListingDeck.js +1 -2
  82. package/dist/esm/{SeriesSlider-8f2aca58.js → SeriesSlider-8414085b.js} +7 -2
  83. package/dist/esm/TaxonomyCard.js +11 -8
  84. package/dist/esm/TaxonomyDescription.js +1 -2
  85. package/dist/esm/ThumbnailCard.js +7 -3
  86. package/dist/esm/VerticalHero.js +7 -3
  87. package/dist/esm/VideoProgramLandingPage.js +1 -2
  88. package/dist/esm/VideoSeriesCard.js +3 -4
  89. package/dist/esm/VideoSeriesLandingPage.js +0 -1
  90. package/dist/esm/VideoSeriesListing.js +1 -2
  91. package/dist/esm/View.js +9 -9
  92. package/dist/esm/YahooHero.js +8 -6
  93. package/dist/esm/YoutubeGroup.js +8 -4
  94. package/dist/esm/getSerializers.js +1 -2
  95. package/dist/esm/{index-e8c6a892.js → index-04c4d8d6.js} +67 -23
  96. package/dist/esm/index.js +19 -6
  97. package/dist/esm/urlFor.js +2 -34
  98. package/package.json +1 -1
@@ -2,12 +2,11 @@
2
2
 
3
3
  var React = require('react');
4
4
  var moment = require('./moment-aca40de1.js');
5
- var urlFor = require('./urlFor.js');
5
+ var index = require('./index-efca863c.js');
6
6
  var entities = require('./entities-3f9d0f2f.js');
7
- var index = require('./index-eadd5035.js');
7
+ var index$1 = require('./index-eadd5035.js');
8
8
  var AuthorComponent = require('./AuthorComponent-c21aac7f.js');
9
9
  require('./_commonjsHelpers-06173234.js');
10
- require('./index-efca863c.js');
11
10
  require('react-dom');
12
11
  require('prop-types');
13
12
  require('./slicedToArray-5d1bc3b3.js');
@@ -32,11 +31,21 @@ var GridHero = function GridHero(props) {
32
31
  _props$subHeight = props.subHeight,
33
32
  subHeight = _props$subHeight === undefined ? 270 : _props$subHeight;
34
33
 
34
+ var builder = index.imageUrlBuilder(client);
35
+ function urlFor(source) {
36
+ var imageWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
37
+ var imageHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
38
+
39
+ var url = builder.image(source);
40
+ if (imageWidth) url = url.width(imageWidth);
41
+ if (imageHeight) url = url.height(imageHeight);
42
+ return url.auto('format').url();
43
+ }
35
44
 
36
45
  var topArticleThumbnail = '';
37
46
  var topArticleAltText = topArticle.title;
38
47
  if (topArticle.thumbnail && topArticle.thumbnail.asset) {
39
- topArticleThumbnail = urlFor({ client: client, source: topArticle.thumbnail.asset, imageWidth: topWidth });
48
+ topArticleThumbnail = urlFor(topArticle.thumbnail.asset, topWidth);
40
49
  topArticleAltText = topArticle.thumbnail.asset.originalFileName;
41
50
  } else if (props.thumbnail) {
42
51
  topArticleThumbnail = props.thumbnail;
@@ -75,7 +84,7 @@ var GridHero = function GridHero(props) {
75
84
  moment.moment(topArticle.published).format('MMMM DD, YYYY ')
76
85
  ),
77
86
  topArticle.authorMapping && topArticle.authorMapping.length > 0 && React__default['default'].createElement(
78
- index.LazyLoad,
87
+ index$1.LazyLoad,
79
88
  { height: 50 },
80
89
  React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: topArticle.url.current, index: topArticle.url.current, authors: topArticle.authorMapping })
81
90
  ),
@@ -89,11 +98,11 @@ var GridHero = function GridHero(props) {
89
98
  React__default['default'].createElement(
90
99
  'div',
91
100
  { className: 'grid-sub-article-container' },
92
- subArticles.map(function (article, index$1) {
101
+ subArticles.map(function (article, index) {
93
102
  var articleThumbnail = '';
94
103
  var articleAltText = article.title;
95
104
  if (article.thumbnail && article.thumbnail.asset) {
96
- articleThumbnail = urlFor({ client: client, source: article.thumbnail.asset, imageWidth: subWidth, imageHeight: subHeight });
105
+ articleThumbnail = urlFor(article.thumbnail.asset, subWidth, subHeight);
97
106
  articleAltText = article.thumbnail.asset.originalFileName;
98
107
  } else if (props.thumbnail) {
99
108
  articleThumbnail = props.thumbnail;
@@ -101,7 +110,7 @@ var GridHero = function GridHero(props) {
101
110
 
102
111
  return React__default['default'].createElement(
103
112
  'div',
104
- { key: index$1, className: 'grid-sub-article sub-grid-' + (index$1 + 1) },
113
+ { key: index, className: 'grid-sub-article sub-grid-' + (index + 1) },
105
114
  articleThumbnail && React__default['default'].createElement(
106
115
  'a',
107
116
  { href: '/view/' + article.url.current },
@@ -125,9 +134,9 @@ var GridHero = function GridHero(props) {
125
134
  moment.moment(article.published).format('MMMM DD, YYYY ')
126
135
  ),
127
136
  article.authorMapping && article.authorMapping.length > 0 && React__default['default'].createElement(
128
- index.LazyLoad,
137
+ index$1.LazyLoad,
129
138
  { height: 50 },
130
- React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: index$1.toString(), index: index$1, authors: article.authorMapping })
139
+ React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
131
140
  ),
132
141
  article.summary && React__default['default'].createElement(
133
142
  'p',
@@ -5,7 +5,7 @@ var slicedToArray = require('./slicedToArray-5d1bc3b3.js');
5
5
  var React = require('react');
6
6
  var index = require('./index-187c967e.js');
7
7
  var smoothscroll = require('./smoothscroll-99df7f93.js');
8
- var urlFor = require('./urlFor.js');
8
+ var index$1 = require('./index-efca863c.js');
9
9
  require('./_commonjsHelpers-06173234.js');
10
10
  require('./es6.string.iterator-c2573ffd.js');
11
11
  require('./_to-object-6de10e57.js');
@@ -14,7 +14,6 @@ require('./_is-array-6128bd56.js');
14
14
  require('./_object-pie-083f2dd6.js');
15
15
  require('./_library-dd23b178.js');
16
16
  require('./core.get-iterator-method-f474eacc.js');
17
- require('./index-efca863c.js');
18
17
 
19
18
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
20
19
 
@@ -41,6 +40,11 @@ var GroupDeck = function GroupDeck(props) {
41
40
  scrollPosition = _useState6[0],
42
41
  setScrollPosition = _useState6[1];
43
42
 
43
+ var urlFor = function urlFor(source, client) {
44
+ var builder = index$1.imageUrlBuilder(client);
45
+ return builder.image(source).auto('format');
46
+ };
47
+
44
48
  React.useEffect(function () {
45
49
  //IE11 Polyfill
46
50
  smoothscroll.smoothscroll.polyfill();
@@ -166,7 +170,7 @@ var GroupDeck = function GroupDeck(props) {
166
170
  var thumbnail = void 0;
167
171
 
168
172
  if (video.thumbnail && video.thumbnail.asset) {
169
- thumbnail = urlFor({ source: video.thumbnail, client: props.client });
173
+ thumbnail = urlFor(video.thumbnail, props.client);
170
174
  } else if (_typeof._typeof(video.thumbnail == 'string')) {
171
175
  thumbnail = video.thumbnail;
172
176
  } else {
@@ -240,7 +244,7 @@ var GroupDeck = function GroupDeck(props) {
240
244
  var _url = '' + video.link;
241
245
  var _thumbnail = void 0;
242
246
  if (video.thumbnail && video.thumbnail.asset) {
243
- _thumbnail = urlFor({ source: video.thumbnail, client: props.client });
247
+ _thumbnail = urlFor(video.thumbnail, props.client);
244
248
  } else if (_typeof._typeof(video.thumbnail == 'string')) {
245
249
  _thumbnail = video.thumbnail;
246
250
  } else {
@@ -168,17 +168,11 @@ var HamMagazine = function HamMagazine(props) {
168
168
  var adSection = document.querySelector('.AD728x90');
169
169
  var navLinks = document.getElementById('nav-links');
170
170
  var mastNav = document.querySelector('.nav-brands');
171
- if (mastNav && mastNav.offsetHeight) setTopOffset(mastNav.offsetHeight - 3);
172
-
173
- if (window.pageYOffset > navOffsetTop) {
174
- if (navRef.current && navRef.current.style) {
175
- navRef.current.style.position = 'fixed';
176
- if (mastNav && mastNav.offsetHeight) navRef.current.style.top = mastNav.offsetHeight;
177
- }
178
- }
179
- var stickyNav = window.addEventListener('scroll', function () {
171
+ var stickNavOnScroll = function stickNavOnScroll() {
180
172
  // Taking into consideration the height of the top navbar while setting the navigation fixed
173
+
181
174
  if (window && topNavRef && topNavRef.current && navRef && navRef.current && window.pageYOffset !== 0 && window.pageYOffset + topNavRef.current.clientHeight + navRef.current.clientHeight > navOffsetTop) {
175
+
182
176
  if (navRef.current && navRef.current.style) {
183
177
  navRef.current.style.position = 'fixed';
184
178
  if (mastNav && mastNav.offsetHeight) navRef.current.style.top = mastNav.offsetHeight;
@@ -195,9 +189,25 @@ var HamMagazine = function HamMagazine(props) {
195
189
  setIsSticky(false);
196
190
  navLinks.style.margin = '0px auto 0px 0px';
197
191
  }
198
- });
192
+ };
193
+ if (mastNav && mastNav.offsetHeight) setTopOffset(mastNav.offsetHeight - 3);
194
+
195
+ if (window.pageYOffset > navOffsetTop) {
196
+ if (navRef.current && navRef.current.style) {
197
+ navRef.current.style.position = 'fixed';
198
+ if (mastNav && mastNav.offsetHeight) navRef.current.style.top = mastNav.offsetHeight;
199
+ }
200
+ }
201
+
202
+ if (props.initiallyCollapsed && !main.main_43) {
203
+ navRef.current.style.position = 'fixed';
204
+ setIsSticky(true);
205
+ navLinks.style.margin = 'auto';
206
+ if (mastNav && mastNav.offsetHeight) navRef.current.style.top = mastNav.offsetHeight;
207
+ }
208
+ window.addEventListener('scroll', stickNavOnScroll);
199
209
  return function () {
200
- window.removeEventListener('scroll', stickyNav);
210
+ window.removeEventListener('scroll', stickNavOnScroll);
201
211
  };
202
212
  }, []);
203
213
 
package/dist/cjs/Hero.js CHANGED
@@ -2,15 +2,26 @@
2
2
 
3
3
  var React = require('react');
4
4
  var reactBootstrap = require('react-bootstrap');
5
- var urlFor = require('./urlFor.js');
5
+ var index = require('./index-efca863c.js');
6
6
  var entities = require('./entities-3f9d0f2f.js');
7
- require('./index-efca863c.js');
8
7
  require('./_commonjsHelpers-06173234.js');
9
8
 
10
9
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
10
 
12
11
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
12
 
13
+ var urlFor = function urlFor(source, client) {
14
+ var builder = index.imageUrlBuilder(client);
15
+ return builder.image(source).auto('format');
16
+ };
17
+
18
+ var renderCardImage = function renderCardImage(thumbnail, client, imageHeight, imageWidth) {
19
+ var url = urlFor(thumbnail, client);
20
+ if (imageHeight) url = url.height(imageHeight);
21
+ if (imageWidth) url = url.width(imageWidth);
22
+ return url.url();
23
+ };
24
+
14
25
  var Hero = function Hero(_ref) {
15
26
  var data = _ref.data,
16
27
  client = _ref.client,
@@ -32,7 +43,7 @@ var Hero = function Hero(_ref) {
32
43
  { className: 'h4' },
33
44
  title
34
45
  ),
35
- thumbnail && client && React__default['default'].createElement(reactBootstrap.Card.Img, { src: urlFor({ source: thumbnail, client: client, imageHeight: imageHeight, imageWidth: imageWidth }), alt: title }),
46
+ thumbnail && client && React__default['default'].createElement(reactBootstrap.Card.Img, { src: renderCardImage(thumbnail, client, imageHeight, imageWidth) }),
36
47
  summary && React__default['default'].createElement(
37
48
  reactBootstrap.Card.Footer,
38
49
  { className: 'h6' },
@@ -5,7 +5,7 @@ var React = require('react');
5
5
  var ArticleCarousel = require('./ArticleCarousel.js');
6
6
  var index_esm = require('./index.esm-974f47d9.js');
7
7
  var BlockContent = require('./BlockContent-36e54d77.js');
8
- var getSerializers = require('./index-55c6de08.js');
8
+ var getSerializers = require('./index-e5fd35c7.js');
9
9
  require('./_commonjsHelpers-06173234.js');
10
10
  require('./_to-object-6de10e57.js');
11
11
  require('./_object-pie-083f2dd6.js');
@@ -22,7 +22,6 @@ require('./index-eadd5035.js');
22
22
  require('react-dom');
23
23
  require('prop-types');
24
24
  require('./smoothscroll-99df7f93.js');
25
- require('./urlFor.js');
26
25
  require('./index-efca863c.js');
27
26
  require('./main-025fdc78.js');
28
27
  require('./iconBase-68959171.js');
@@ -2,10 +2,9 @@
2
2
 
3
3
  var React = require('react');
4
4
  require('./moment-aca40de1.js');
5
- var urlFor = require('./urlFor.js');
5
+ var index = require('./index-efca863c.js');
6
6
  var index_esm = require('./index.esm-05850a2f.js');
7
7
  require('./_commonjsHelpers-06173234.js');
8
- require('./index-efca863c.js');
9
8
  require('./iconBase-68959171.js');
10
9
 
11
10
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -15,7 +14,10 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
15
14
  var HorizontalHero = function HorizontalHero(props) {
16
15
  var client = props.client;
17
16
 
18
-
17
+ var builder = index.imageUrlBuilder(client);
18
+ function urlFor(source) {
19
+ return builder.image(source).auto('format');
20
+ }
19
21
  var topArticle = props.dataRecord[0];
20
22
  var subArticles = props.dataRecord.slice(1, props.dataRecord.length);
21
23
  var _props$heroTitle = props.heroTitle,
@@ -27,8 +29,7 @@ var HorizontalHero = function HorizontalHero(props) {
27
29
  var topArticleThumbnail = '';
28
30
  var topArticleAltText = topArticle.title;
29
31
  if (topArticle.thumbnail && topArticle.thumbnail.asset) {
30
- topArticleThumbnail = urlFor({ client: client, source: topArticle.thumbnail.asset, imageWidth: 350 });
31
-
32
+ topArticleThumbnail = urlFor(topArticle.thumbnail.asset).width(350).url();
32
33
  topArticleAltText = topArticle.thumbnail.asset.originalFileName;
33
34
  }
34
35
  if (props.thumbnail) {
@@ -6,13 +6,12 @@ var Col = require('react-bootstrap/Col');
6
6
  var Card = require('react-bootstrap/Card');
7
7
  var Badge = require('react-bootstrap/Badge');
8
8
  var index = require('./index-eadd5035.js');
9
- var urlFor = require('./urlFor.js');
9
+ var index$1 = require('./index-efca863c.js');
10
10
  var moment = require('./moment-aca40de1.js');
11
11
  var AuthorComponent = require('./AuthorComponent-c21aac7f.js');
12
12
  require('./_commonjsHelpers-06173234.js');
13
13
  require('react-dom');
14
14
  require('prop-types');
15
- require('./index-efca863c.js');
16
15
  require('./slicedToArray-5d1bc3b3.js');
17
16
  require('./web.dom.iterable-46657b5c.js');
18
17
  require('./es6.string.iterator-c2573ffd.js');
@@ -27,6 +26,28 @@ var Col__default = /*#__PURE__*/_interopDefaultLegacy(Col);
27
26
  var Card__default = /*#__PURE__*/_interopDefaultLegacy(Card);
28
27
  var Badge__default = /*#__PURE__*/_interopDefaultLegacy(Badge);
29
28
 
29
+ var urlFor = function urlFor(source, client) {
30
+ var builder = index$1.imageUrlBuilder(client);
31
+ return builder.image(source).auto('format');
32
+ };
33
+
34
+ var renderCardImage = function renderCardImage(props) {
35
+ var coverImage = props.coverImage,
36
+ imageHeight = props.imageHeight,
37
+ imageWidth = props.imageWidth,
38
+ client = props.client,
39
+ Settings = props.Settings;
40
+
41
+ if (coverImage && coverImage.asset) {
42
+ var url = urlFor(coverImage, client);
43
+ if (imageHeight) url = url.height(imageHeight);
44
+ if (imageWidth) url = url.width(imageWidth);
45
+ return url.url();
46
+ } else {
47
+ return Settings.logo;
48
+ }
49
+ };
50
+
30
51
  var PublicationDeckStack = function PublicationDeckStack(props) {
31
52
  var title = props.title,
32
53
  coverImage = props.coverImage,
@@ -35,12 +56,8 @@ var PublicationDeckStack = function PublicationDeckStack(props) {
35
56
  author = props.author,
36
57
  summary = props.summary,
37
58
  section = props.section,
38
- _props$imageHeight = props.imageHeight,
39
- imageHeight = _props$imageHeight === undefined ? null : _props$imageHeight,
40
- _props$imageWidth = props.imageWidth,
41
- imageWidth = _props$imageWidth === undefined ? null : _props$imageWidth,
42
- _props$imageFit = props.imageFit,
43
- imageFit = _props$imageFit === undefined ? null : _props$imageFit,
59
+ imageHeight = props.imageHeight,
60
+ imageWidth = props.imageWidth,
44
61
  client = props.client,
45
62
  Settings = props.Settings,
46
63
  index$1 = props.index,
@@ -66,7 +83,7 @@ var PublicationDeckStack = function PublicationDeckStack(props) {
66
83
  { height: imageHeight },
67
84
  React__default['default'].createElement(Card__default['default'].Img, {
68
85
  variant: 'right',
69
- src: coverImage ? urlFor({ source: coverImage, imageHeight: imageHeight, imageWidth: imageWidth, imageFit: imageFit, client: client }) : Settings.logo,
86
+ src: renderCardImage({ coverImage: coverImage, imageHeight: imageHeight, imageWidth: imageWidth, client: client, Settings: Settings }),
70
87
  alt: title,
71
88
  style: { width: '170px', height: 'auto', objectFit: 'contain', padding: '0.25rem', float: 'left' }
72
89
  })
@@ -157,7 +174,7 @@ var PublicationDeckBlock = function PublicationDeckBlock(props) {
157
174
  coverImage && React__default['default'].createElement(
158
175
  index.LazyLoad,
159
176
  { height: imageHeight },
160
- React__default['default'].createElement(Card__default['default'].Img, { variant: 'top', src: coverImage ? urlFor({ source: coverImage, imageHeight: imageHeight, imageWidth: imageWidth, imageFit: imageFit, client: client, Settings: Settings }) : Settings.logo, alt: title })
177
+ React__default['default'].createElement(Card__default['default'].Img, { variant: 'top', src: renderCardImage({ coverImage: coverImage, imageHeight: imageHeight, imageWidth: imageWidth, client: client, Settings: Settings }), alt: title })
161
178
  ),
162
179
  React__default['default'].createElement(
163
180
  Card__default['default'].Body,
@@ -9,7 +9,7 @@ var Col = require('react-bootstrap/Col');
9
9
  var Button = require('react-bootstrap/Button');
10
10
  var Card = require('react-bootstrap/Card');
11
11
  var index = require('./index-eadd5035.js');
12
- var urlFor = require('./urlFor.js');
12
+ var index$1 = require('./index-efca863c.js');
13
13
  var index_es = require('./index.es-f3e47207.js');
14
14
  require('./_commonjsHelpers-06173234.js');
15
15
  require('./es6.string.iterator-c2573ffd.js');
@@ -20,7 +20,6 @@ require('./_object-pie-083f2dd6.js');
20
20
  require('./web.dom.iterable-46657b5c.js');
21
21
  require('react-dom');
22
22
  require('prop-types');
23
- require('./index-efca863c.js');
24
23
 
25
24
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
26
25
 
@@ -41,12 +40,8 @@ var usePrevious = function usePrevious(value) {
41
40
  var IssueDeck = function IssueDeck(props) {
42
41
  var data = props.data,
43
42
  href = props.href,
44
- _props$imageHeight = props.imageHeight,
45
- imageHeight = _props$imageHeight === undefined ? null : _props$imageHeight,
46
- _props$imageWidth = props.imageWidth,
47
- imageWidth = _props$imageWidth === undefined ? null : _props$imageWidth,
48
- _props$imageFit = props.imageFit,
49
- imageFit = _props$imageFit === undefined ? null : _props$imageFit,
43
+ imageHeight = props.imageHeight,
44
+ imageWidth = props.imageWidth,
50
45
  Website = props.Website,
51
46
  client = props.client,
52
47
  publication = props.publication,
@@ -78,10 +73,17 @@ var IssueDeck = function IssueDeck(props) {
78
73
 
79
74
  var prevValues = usePrevious(values);
80
75
 
76
+ var urlFor = function urlFor(source) {
77
+ var builder = index$1.imageUrlBuilder(client);
78
+ return builder.image(source).auto('format');
79
+ };
80
+
81
81
  var renderCardImage = function renderCardImage(thumbnail) {
82
82
  if (thumbnail && thumbnail.asset) {
83
- var url = urlFor({ client: client, source: thumbnail, imageHeight: imageHeight, imageWidth: imageWidth, imageFit: imageFit });
84
- return url;
83
+ var url = urlFor(thumbnail);
84
+ if (imageHeight) url = url.height(imageHeight);
85
+ if (imageWidth) url = url.width(imageWidth);
86
+ return url.url();
85
87
  } else {
86
88
  return Website.logo;
87
89
  }
@@ -5,7 +5,7 @@ var React = require('react');
5
5
  var QueueDeckExpanded = require('./QueueDeckExpanded.js');
6
6
  var Breadcrumbs = require('./Breadcrumbs.js');
7
7
  var BlockContent = require('./BlockContent-36e54d77.js');
8
- var getSerializers = require('./index-55c6de08.js');
8
+ var getSerializers = require('./index-e5fd35c7.js');
9
9
  require('./_commonjsHelpers-06173234.js');
10
10
  require('./_to-object-6de10e57.js');
11
11
  require('./_object-pie-083f2dd6.js');
@@ -16,7 +16,6 @@ require('./core.get-iterator-method-f474eacc.js');
16
16
  require('./toConsumableArray-ddb70795.js');
17
17
  require('./_iter-detect-55a5657a.js');
18
18
  require('react-bootstrap');
19
- require('./urlFor.js');
20
19
  require('./index-efca863c.js');
21
20
  require('./index.es-f3e47207.js');
22
21
  require('./moment-aca40de1.js');
@@ -63,7 +63,7 @@ var MasterDeck = function (_React$Component) {
63
63
  args[_key] = arguments[_key];
64
64
  }
65
65
 
66
- return _ret = (_temp = (_this = inherits._possibleConstructorReturn(this, (_ref = MasterDeck.__proto__ || inherits._Object$getPrototypeOf(MasterDeck)).call.apply(_ref, [this].concat(args))), _this), _this.Deck = _this.props.deck, _this.variant = _this.props.variant, _this.mapping = _this.props.mapping, _this.data = _this.props.dataRecord || [], _this.query = _this.props.query, _this.params = _this.props.params, _this.pointer = _this.props.pointer ? _this.props.pointer : false, _this.pointerArray = _this.props.pointerArray ? _this.props.pointerArray : false, _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.rightItems = _this.props.rightItems ? _this.props.rightItems : false, _this.isSeriesLanding = _this.props.isSeriesLanding ? _this.props.isSeriesLanding : false, _this.client = _this.props.client, _this.state = {
66
+ return _ret = (_temp = (_this = inherits._possibleConstructorReturn(this, (_ref = MasterDeck.__proto__ || inherits._Object$getPrototypeOf(MasterDeck)).call.apply(_ref, [this].concat(args))), _this), _this.Deck = _this.props.deck, _this.variant = _this.props.variant, _this.mapping = _this.props.mapping, _this.data = _this.props.dataRecord || [], _this.query = _this.props.query, _this.params = _this.props.params, _this.pointer = _this.props.pointer ? _this.props.pointer : false, _this.pointerArray = _this.props.pointerArray ? _this.props.pointerArray : false, _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.rightItems = _this.props.rightItems ? _this.props.rightItems : false, _this.isSeriesLanding = _this.props.isSeriesLanding ? _this.props.isSeriesLanding : false, _this.state = {
67
67
  data: _this.data,
68
68
  dataKeptToCompareNewDatarecord: _this.data,
69
69
  per: _this.params ? _this.params.to : 2,
@@ -12,12 +12,12 @@ var ReactDOM = require('react-dom');
12
12
  var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
13
13
  var Link = require('next/link');
14
14
  var MasterDeck = require('./MasterDeck.js');
15
- var index$1 = require('./index-eadd5035.js');
16
- var urlFor = require('./urlFor.js');
15
+ var index$2 = require('./index-eadd5035.js');
16
+ var index$1 = require('./index-efca863c.js');
17
17
  var moment = require('./moment-aca40de1.js');
18
18
  var styleInject_es = require('./style-inject.es-dcee06b6.js');
19
19
  var BlockContent = require('./BlockContent-36e54d77.js');
20
- var getSerializers = require('./index-55c6de08.js');
20
+ var getSerializers = require('./index-e5fd35c7.js');
21
21
  require('./define-property-c88be878.js');
22
22
  require('./_to-object-6de10e57.js');
23
23
  require('./es6.string.iterator-c2573ffd.js');
@@ -43,7 +43,6 @@ require('./isSymbol-03abbdf0.js');
43
43
  require('./toNumber-5e1fac58.js');
44
44
  require('./index.es-f3e47207.js');
45
45
  require('./visibility-sensor-eb2c5b69.js');
46
- require('./index-efca863c.js');
47
46
  require('./ADlgInfeed-2ee46b09.js');
48
47
  require('./AdSlot.js');
49
48
  require('./Beam.js');
@@ -9397,6 +9396,7 @@ var MediaSeriesCard = function MediaSeriesCard(props) {
9397
9396
  defaultImage = props.defaultImage,
9398
9397
  client = props.client;
9399
9398
 
9399
+ var builder = index$1.imageUrlBuilder(client);
9400
9400
 
9401
9401
  return React__default['default'].createElement(
9402
9402
  'div',
@@ -9411,10 +9411,10 @@ var MediaSeriesCard = function MediaSeriesCard(props) {
9411
9411
  'figure',
9412
9412
  null,
9413
9413
  React__default['default'].createElement(
9414
- index$1.LazyLoad,
9414
+ index$2.LazyLoad,
9415
9415
  null,
9416
9416
  React__default['default'].createElement('img', {
9417
- src: data.thumbnail && data.thumbnail.asset ? urlFor({ client: client, source: data.thumbnail }) : data.thumbnail && _typeof._typeof(data.thumbnail == 'string') ? data.thumbnail : defaultImage
9417
+ src: data.thumbnail && data.thumbnail.asset ? builder.image(data.thumbnail).url() : data.thumbnail && _typeof._typeof(data.thumbnail == 'string') ? data.thumbnail : defaultImage
9418
9418
  })
9419
9419
  )
9420
9420
  )
@@ -1,11 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var urlFor = require('./urlFor.js');
4
+ var index = require('./index-efca863c.js');
5
5
  require('react-bootstrap/Badge');
6
6
  require('./iconBase-68959171.js');
7
7
  var moment = require('./moment-aca40de1.js');
8
- require('./index-efca863c.js');
9
8
  require('./_commonjsHelpers-06173234.js');
10
9
 
11
10
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -15,7 +14,10 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
15
14
  var OncliveHero = function OncliveHero(props) {
16
15
  var client = props.client;
17
16
 
18
-
17
+ var builder = index.imageUrlBuilder(client);
18
+ function urlFor(source) {
19
+ return builder.image(source).auto('format');
20
+ }
19
21
  return React__default['default'].createElement(
20
22
  'div',
21
23
  { className: 'article-group--container' },
@@ -23,8 +25,7 @@ var OncliveHero = function OncliveHero(props) {
23
25
  var articleThumbnail = '';
24
26
  var articleAltText = article.title;
25
27
  if (article.thumbnail && article.thumbnail.asset) {
26
- articleThumbnail = urlFor({ client: client, source: article.thumbnail.asset, imageWidth: 250 });
27
-
28
+ articleThumbnail = urlFor(article.thumbnail.asset).width(250).url();
28
29
  articleAltText = article.thumbnail.asset.originalFileName;
29
30
  } else if (props.thumbnail) {
30
31
  articleThumbnail = props.thumbnail;
@@ -2,12 +2,11 @@
2
2
 
3
3
  var React = require('react');
4
4
  var moment = require('./moment-aca40de1.js');
5
- var urlFor = require('./urlFor.js');
5
+ var index = require('./index-efca863c.js');
6
6
  var entities = require('./entities-3f9d0f2f.js');
7
7
  var AuthorComponent = require('./AuthorComponent-c21aac7f.js');
8
- var index = require('./index-eadd5035.js');
8
+ var index$1 = require('./index-eadd5035.js');
9
9
  require('./_commonjsHelpers-06173234.js');
10
- require('./index-efca863c.js');
11
10
  require('./slicedToArray-5d1bc3b3.js');
12
11
  require('./web.dom.iterable-46657b5c.js');
13
12
  require('./es6.string.iterator-c2573ffd.js');
@@ -28,12 +27,15 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
28
27
  var subArticles = props.dataRecord.slice(3, props.dataRecord.length);
29
28
  var client = props.client;
30
29
 
30
+ var builder = index.imageUrlBuilder(client);
31
+ function urlFor(source) {
32
+ return builder.image(source).auto('format');
33
+ }
31
34
 
32
35
  var topArticleThumbnail = '';
33
36
  var topArticleAltText = topArticle.title;
34
37
  if (topArticle.thumbnail && topArticle.thumbnail.asset) {
35
- topArticleThumbnail = urlFor({ client: client, source: topArticle.thumbnail.asset, imageWidth: 550 });
36
-
38
+ topArticleThumbnail = urlFor(topArticle.thumbnail.asset).width(550).url();
37
39
  topArticleAltText = topArticle.thumbnail.asset.originalFileName;
38
40
  } else if (props.thumbnail) {
39
41
  topArticleThumbnail = props.thumbnail;
@@ -76,18 +78,18 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
76
78
  React__default['default'].createElement(
77
79
  'div',
78
80
  { className: 'sub-articles-container middle-single' },
79
- middleArticles && middleArticles.map(function (article, index$1) {
81
+ middleArticles && middleArticles.map(function (article, index) {
80
82
  var articleThumbnail = '';
81
83
  var articleAltText = article.title;
82
84
  if (article.thumbnail && article.thumbnail.asset) {
83
- articleThumbnail = urlFor({ client: client, source: article.thumbnail.asset, imageWidth: 250 });
85
+ articleThumbnail = urlFor(article.thumbnail.asset).width(250).url();
84
86
  articleAltText = article.thumbnail.asset.originalFileName;
85
87
  } else if (props.thumbnail) {
86
88
  articleThumbnail = props.thumbnail;
87
89
  }
88
90
  return React__default['default'].createElement(
89
91
  'div',
90
- { key: index$1, className: 'sub-article' },
92
+ { key: index, className: 'sub-article' },
91
93
  React__default['default'].createElement(
92
94
  'a',
93
95
  { href: '/view/' + article.url.current },
@@ -115,9 +117,9 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
115
117
  'div',
116
118
  { className: 'author-wrapper' },
117
119
  React__default['default'].createElement(
118
- index.LazyLoad,
120
+ index$1.LazyLoad,
119
121
  { height: 50 },
120
- React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: index$1.toString(), index: index$1, authors: article.authorMapping })
122
+ React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
121
123
  )
122
124
  )
123
125
  )
@@ -131,19 +133,18 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
131
133
  React__default['default'].createElement(
132
134
  'div',
133
135
  { className: 'sub-articles-container middle-group' },
134
- middleArticles && middleArticles.map(function (article, index$1) {
136
+ middleArticles && middleArticles.map(function (article, index) {
135
137
  var articleThumbnail = '';
136
138
  var articleAltText = article.title;
137
139
  if (article.thumbnail && article.thumbnail.asset) {
138
- articleThumbnail = urlFor({ client: client, source: article.thumbnail.asset, imageWidth: 250 });
139
-
140
+ articleThumbnail = urlFor(article.thumbnail.asset).width(250).url();
140
141
  articleAltText = article.thumbnail.asset.originalFileName;
141
142
  } else if (props.thumbnail) {
142
143
  articleThumbnail = props.thumbnail;
143
144
  }
144
145
  return React__default['default'].createElement(
145
146
  'div',
146
- { key: index$1, className: 'sub-article' },
147
+ { key: index, className: 'sub-article' },
147
148
  React__default['default'].createElement(
148
149
  'a',
149
150
  { href: '/view/' + article.url.current },
@@ -171,9 +172,9 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
171
172
  'div',
172
173
  { className: 'author-wrapper' },
173
174
  React__default['default'].createElement(
174
- index.LazyLoad,
175
+ index$1.LazyLoad,
175
176
  { height: 50 },
176
- React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: index$1.toString(), index: index$1, authors: article.authorMapping })
177
+ React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
177
178
  )
178
179
  )
179
180
  )
@@ -183,18 +184,18 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
183
184
  React__default['default'].createElement(
184
185
  'div',
185
186
  { className: 'sub-articles-container' },
186
- subArticles && subArticles.map(function (article, index$1) {
187
+ subArticles && subArticles.map(function (article, index) {
187
188
  var articleThumbnail = '';
188
189
  var articleAltText = article.title;
189
190
  if (article.thumbnail && article.thumbnail.asset) {
190
- articleThumbnail = urlFor({ client: client, source: article.thumbnail.asset, imageWidth: 250 });
191
+ articleThumbnail = urlFor(article.thumbnail.asset).width(250).url();
191
192
  articleAltText = article.thumbnail.asset.originalFileName;
192
193
  } else if (props.thumbnail) {
193
194
  articleThumbnail = props.thumbnail;
194
195
  }
195
196
  return React__default['default'].createElement(
196
197
  'div',
197
- { key: index$1, className: 'sub-article' },
198
+ { key: index, className: 'sub-article' },
198
199
  React__default['default'].createElement(
199
200
  'a',
200
201
  { href: '/view/' + article.url.current },
@@ -222,9 +223,9 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
222
223
  'div',
223
224
  { className: 'author-wrapper' },
224
225
  React__default['default'].createElement(
225
- index.LazyLoad,
226
+ index$1.LazyLoad,
226
227
  { height: 50 },
227
- React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: index$1.toString(), index: index$1, authors: article.authorMapping })
228
+ React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
228
229
  )
229
230
  )
230
231
  )