@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/GridContent.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { _ as _toConsumableArray } from './toConsumableArray-6d9a4616.js';
|
|
2
2
|
import { _ as _extends } from './extends-60e0e1c6.js';
|
|
3
3
|
import { _ as _inherits, a as _classCallCheck, b as _possibleConstructorReturn, c as _Object$getPrototypeOf, d as _createClass } from './inherits-a41fe93f.js';
|
|
4
|
-
import
|
|
5
|
-
import { l as lib_3 } from './index-
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { l as lib_3 } from './index-2446af28.js';
|
|
6
6
|
import Container from 'react-bootstrap/Container';
|
|
7
7
|
import Row from 'react-bootstrap/Row';
|
|
8
8
|
import Col from 'react-bootstrap/Col';
|
|
9
9
|
import Card from 'react-bootstrap/Card';
|
|
10
|
-
import { V as VisibilitySensor } from './visibility-sensor-
|
|
10
|
+
import { V as VisibilitySensor } from './visibility-sensor-f40c2564.js';
|
|
11
11
|
import { m as moment } from './moment-bc12cb97.js';
|
|
12
12
|
import { withRouter } from 'next/router';
|
|
13
|
-
import { L as LazyLoad } from './index-
|
|
13
|
+
import { L as LazyLoad } from './index-35bdcc81.js';
|
|
14
14
|
import { c as clean_html_1 } from './entities-932b50cf.js';
|
|
15
|
-
import { A as ADInfeed } from './ADInfeed-
|
|
15
|
+
import { A as ADInfeed } from './ADInfeed-7aaa47e1.js';
|
|
16
16
|
import { l as lodash } from './lodash-f97fd99a.js';
|
|
17
|
-
import { A as ADlgInfeed } from './ADlgInfeed-
|
|
17
|
+
import { A as ADlgInfeed } from './ADlgInfeed-78f95e78.js';
|
|
18
18
|
import { g as getContentCategory } from './getContentCategory-15dcc413.js';
|
|
19
19
|
import { g as get_1 } from './get-3c308da4.js';
|
|
20
20
|
import { d as debounce_1 } from './debounce-533d9748.js';
|
|
21
|
-
import { I as InfiniteScroll } from './index.es-
|
|
22
|
-
import
|
|
23
|
-
import { m as main_43 } from './main-
|
|
21
|
+
import { I as InfiniteScroll } from './index.es-c6222053.js';
|
|
22
|
+
import urlFor from './urlForV2.js';
|
|
23
|
+
import { m as main_43 } from './main-b5c5aac1.js';
|
|
24
24
|
import './AD.js';
|
|
25
|
-
import { A as AuthorComponent } from './AuthorComponent-
|
|
25
|
+
import { A as AuthorComponent } from './AuthorComponent-5ae7409f.js';
|
|
26
26
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
27
27
|
import './es6.string.iterator-bc33758b.js';
|
|
28
28
|
import './_to-object-b50e61c3.js';
|
|
@@ -35,6 +35,7 @@ import './typeof-a286cf0c.js';
|
|
|
35
35
|
import './web.dom.iterable-4109ff68.js';
|
|
36
36
|
import './_is-array-3e99e06e.js';
|
|
37
37
|
import './_library-528f1934.js';
|
|
38
|
+
import './events-6c3a7a63.js';
|
|
38
39
|
import 'prop-types';
|
|
39
40
|
import 'react-dom';
|
|
40
41
|
import './slicedToArray-be2f7a22.js';
|
|
@@ -46,6 +47,7 @@ import './Segment.js';
|
|
|
46
47
|
import './isSymbol-a7e9aafe.js';
|
|
47
48
|
import './eq-bdcbf886.js';
|
|
48
49
|
import './toNumber-5aeba6e7.js';
|
|
50
|
+
import './index-0dbff1d1.js';
|
|
49
51
|
|
|
50
52
|
var GridContent = function (_React$Component) {
|
|
51
53
|
_inherits(GridContent, _React$Component);
|
|
@@ -61,7 +63,7 @@ var GridContent = function (_React$Component) {
|
|
|
61
63
|
args[_key] = arguments[_key];
|
|
62
64
|
}
|
|
63
65
|
|
|
64
|
-
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = GridContent.__proto__ || _Object$getPrototypeOf(GridContent)).call.apply(_ref, [this].concat(args))), _this), _this.page = _this.props.page, _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.state = {
|
|
66
|
+
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = GridContent.__proto__ || _Object$getPrototypeOf(GridContent)).call.apply(_ref, [this].concat(args))), _this), _this.page = _this.props.page, _this.mapping = _this.props.mapping, _this.data = _this.props.dataRecord, _this.query = _this.props.query, _this.params = _this.props.params, _this.client = _this.props.client, _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.state = {
|
|
65
67
|
data: _this.data,
|
|
66
68
|
per: _this.params ? _this.params.to : 2,
|
|
67
69
|
page: _this.props.currentPage || 1,
|
|
@@ -148,17 +150,10 @@ var GridContent = function (_React$Component) {
|
|
|
148
150
|
}
|
|
149
151
|
});
|
|
150
152
|
});
|
|
151
|
-
}, _this.urlFor = function (source) {
|
|
152
|
-
var client = _this.props.client;
|
|
153
|
-
|
|
154
|
-
var builder = imageUrlBuilder(client);
|
|
155
|
-
return builder.image(source).auto('format');
|
|
156
153
|
}, _this.renderCardImage = function (row, page) {
|
|
157
154
|
if (row.thumbnail && row.thumbnail.asset) {
|
|
158
|
-
var url = _this.
|
|
159
|
-
|
|
160
|
-
if (_this.props.imageWidth) url = url.width(_this.props.imageWidth);
|
|
161
|
-
return url.url();
|
|
155
|
+
var url = urlFor({ client: _this.client, source: row.thumbnail, imageHeight: _this.props.imageHeight || null, imageWidth: _this.props.imageWidth || null, imageFit: _this.props.imageFit || null });
|
|
156
|
+
return url;
|
|
162
157
|
} else {
|
|
163
158
|
return _this.defaultImage;
|
|
164
159
|
}
|
|
@@ -231,7 +226,7 @@ var GridContent = function (_React$Component) {
|
|
|
231
226
|
var rightItems = _this.props.rightItems;
|
|
232
227
|
|
|
233
228
|
var i = ((index + 1) / numberOfItemsBeforeAd - 1) % rightItems.length;
|
|
234
|
-
return
|
|
229
|
+
return React.createElement(
|
|
235
230
|
'div',
|
|
236
231
|
{ style: { display: 'flex', flex: '1 0 auto' } },
|
|
237
232
|
rightItems[i].component
|
|
@@ -239,15 +234,15 @@ var GridContent = function (_React$Component) {
|
|
|
239
234
|
}, _this.renderManualPagination = function () {
|
|
240
235
|
var currentPage = _this.state.currentPage;
|
|
241
236
|
|
|
242
|
-
return
|
|
237
|
+
return React.createElement(
|
|
243
238
|
'div',
|
|
244
239
|
{ className: 'd-flex justify-content-between' },
|
|
245
|
-
currentPage && currentPage > 1 &&
|
|
240
|
+
currentPage && currentPage > 1 && React.createElement(
|
|
246
241
|
'a',
|
|
247
242
|
{ href: '?page=' + (currentPage - 1) },
|
|
248
243
|
'<< Previous'
|
|
249
244
|
),
|
|
250
|
-
|
|
245
|
+
React.createElement(
|
|
251
246
|
'a',
|
|
252
247
|
{ href: '?page=' + (currentPage + 1) },
|
|
253
248
|
'Next >>'
|
|
@@ -266,62 +261,62 @@ var GridContent = function (_React$Component) {
|
|
|
266
261
|
var numberOfItemsBeforeAd = 6;
|
|
267
262
|
var numberOfItemsBeforeVideo = 3;
|
|
268
263
|
if (variant === 'stack') {
|
|
269
|
-
return
|
|
264
|
+
return React.createElement(
|
|
270
265
|
Row,
|
|
271
266
|
null,
|
|
272
267
|
this.state.data && this.state.data.length > 0 ? this.state.data.map(function (row, index) {
|
|
273
268
|
// const thumbnailURL = get(row, 'thumbnail.asset.url', this.props.defaultImage)
|
|
274
|
-
return
|
|
269
|
+
return React.createElement(
|
|
275
270
|
Col,
|
|
276
271
|
{ key: index, md: 12, lg: lgVar, style: { display: 'flex', flex: '1 0 auto' } },
|
|
277
|
-
|
|
272
|
+
React.createElement(
|
|
278
273
|
Card,
|
|
279
274
|
{ className: 'queue-card', style: { borderTop: '1px solid #EEE' } },
|
|
280
|
-
|
|
275
|
+
React.createElement(
|
|
281
276
|
Row,
|
|
282
277
|
{ style: { flexDirection: 'row' } },
|
|
283
|
-
|
|
278
|
+
React.createElement(
|
|
284
279
|
Col,
|
|
285
280
|
{ md: 12, lg: 4 },
|
|
286
|
-
|
|
281
|
+
React.createElement(
|
|
287
282
|
'a',
|
|
288
283
|
{ href: _this2.page + '/' + get_1(row, 'url.current') },
|
|
289
|
-
|
|
284
|
+
React.createElement(
|
|
290
285
|
LazyLoad,
|
|
291
286
|
{ height: _this2.props.imageHeight },
|
|
292
|
-
|
|
287
|
+
React.createElement(Card.Img, { variant: 'top', src: _this2.renderCardImage(row, page), alt: row.thumbnail && row.thumbnail.asset ? row.thumbnail.asset.originalFilename : '' })
|
|
293
288
|
)
|
|
294
289
|
)
|
|
295
290
|
),
|
|
296
|
-
|
|
291
|
+
React.createElement(
|
|
297
292
|
Col,
|
|
298
293
|
null,
|
|
299
|
-
|
|
294
|
+
React.createElement(
|
|
300
295
|
Card.Body,
|
|
301
296
|
{ style: { padding: '20px' } },
|
|
302
|
-
|
|
297
|
+
React.createElement(
|
|
303
298
|
Card.Title,
|
|
304
299
|
null,
|
|
305
|
-
|
|
300
|
+
React.createElement(
|
|
306
301
|
'a',
|
|
307
302
|
{ href: _this2.page + '/' + get_1(row, 'url.current') },
|
|
308
303
|
row.title
|
|
309
304
|
)
|
|
310
305
|
),
|
|
311
|
-
_this2.props.showPublished && row.published &&
|
|
306
|
+
_this2.props.showPublished && row.published && React.createElement(
|
|
312
307
|
Card.Subtitle,
|
|
313
308
|
{ style: { marginTop: 0 } },
|
|
314
309
|
moment(row.published).format('MMMM DD, YYYY')
|
|
315
310
|
),
|
|
316
|
-
_this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 &&
|
|
311
|
+
_this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 && React.createElement(
|
|
317
312
|
LazyLoad,
|
|
318
313
|
{ height: 50 },
|
|
319
|
-
|
|
314
|
+
React.createElement(AuthorComponent, { key: index.toString(), index: index, authors: row.authorMapping })
|
|
320
315
|
),
|
|
321
|
-
_this2.props.showCategory && row.contentCategory &&
|
|
316
|
+
_this2.props.showCategory && row.contentCategory && React.createElement(
|
|
322
317
|
LazyLoad,
|
|
323
318
|
{ height: 50 },
|
|
324
|
-
|
|
319
|
+
React.createElement(
|
|
325
320
|
'p',
|
|
326
321
|
{
|
|
327
322
|
className: 'article-category',
|
|
@@ -336,7 +331,7 @@ var GridContent = function (_React$Component) {
|
|
|
336
331
|
getContentCategory(row.contentCategory.name, contentCategoryMapping)
|
|
337
332
|
)
|
|
338
333
|
),
|
|
339
|
-
|
|
334
|
+
React.createElement(
|
|
340
335
|
Card.Text,
|
|
341
336
|
null,
|
|
342
337
|
clean_html_1(row.summary)
|
|
@@ -346,13 +341,13 @@ var GridContent = function (_React$Component) {
|
|
|
346
341
|
)
|
|
347
342
|
)
|
|
348
343
|
);
|
|
349
|
-
}) :
|
|
344
|
+
}) : React.createElement(
|
|
350
345
|
'div',
|
|
351
346
|
null,
|
|
352
|
-
|
|
347
|
+
React.createElement(
|
|
353
348
|
'h5',
|
|
354
349
|
null,
|
|
355
|
-
|
|
350
|
+
React.createElement(
|
|
356
351
|
'em',
|
|
357
352
|
null,
|
|
358
353
|
'New content coming soon, please check back later.'
|
|
@@ -463,7 +458,7 @@ var GridContent = function (_React$Component) {
|
|
|
463
458
|
var itemsPerPage = this.props.params && this.props.params.itemsPerPage ? this.props.params.itemsPerPage : 10;
|
|
464
459
|
var heroContent = this.props.heroContent ? this.props.heroContent : 0;
|
|
465
460
|
var featureCount = 0;
|
|
466
|
-
return
|
|
461
|
+
return React.createElement(
|
|
467
462
|
'div',
|
|
468
463
|
{ className: 'grid-container' },
|
|
469
464
|
posts && posts.length > 0 ? posts.map(function (row, index) {
|
|
@@ -473,58 +468,58 @@ var GridContent = function (_React$Component) {
|
|
|
473
468
|
if (row._type === 'feature') {
|
|
474
469
|
featureCount++;
|
|
475
470
|
if (row.blank || _this2.checkExternalUrl(row.url.current)) {
|
|
476
|
-
return
|
|
477
|
-
|
|
471
|
+
return React.createElement(
|
|
472
|
+
React.Fragment,
|
|
478
473
|
{ key: itemCounter },
|
|
479
|
-
|
|
474
|
+
React.createElement(
|
|
480
475
|
VisibilitySensor,
|
|
481
476
|
{
|
|
482
477
|
partialVisibility: true,
|
|
483
478
|
onChange: function onChange(isVisible) {
|
|
484
479
|
isVisible && _this2.changePageNumber(1, itemsPerPage, index);
|
|
485
480
|
} },
|
|
486
|
-
|
|
481
|
+
React.createElement(
|
|
487
482
|
'div',
|
|
488
483
|
{ counter: itemCounter++, style: { display: 'flex', flex: '1 0 auto' } },
|
|
489
|
-
|
|
484
|
+
React.createElement(
|
|
490
485
|
Card,
|
|
491
486
|
{ className: 'content-card', style: { flexDirection: index === 0 || index % 4 === 0 ? 'top' : 'row' } },
|
|
492
|
-
(row.thumbnail && row.thumbnail.asset || _this2.props.defaultImage) &&
|
|
487
|
+
(row.thumbnail && row.thumbnail.asset || _this2.props.defaultImage) && React.createElement(
|
|
493
488
|
'a',
|
|
494
489
|
{ rel: 'noopener', href: row.url.current, target: '_blank', className: index === 0 || index % 4 === 0 ? '' : 'card-image' },
|
|
495
|
-
|
|
490
|
+
React.createElement(
|
|
496
491
|
LazyLoad,
|
|
497
492
|
{ height: _this2.props.imageHeight },
|
|
498
|
-
|
|
493
|
+
React.createElement(Card.Img, {
|
|
499
494
|
variant: 'top',
|
|
500
495
|
src: _this2.renderCardImage(row, page),
|
|
501
496
|
alt: row.thumbnail && row.thumbnail.asset ? row.thumbnail.asset.originalFilename : ''
|
|
502
497
|
})
|
|
503
498
|
)
|
|
504
499
|
),
|
|
505
|
-
|
|
500
|
+
React.createElement(
|
|
506
501
|
Card.Body,
|
|
507
502
|
null,
|
|
508
|
-
|
|
503
|
+
React.createElement(
|
|
509
504
|
'a',
|
|
510
505
|
{ rel: 'noopener', href: row.url.current, target: '_blank' },
|
|
511
|
-
|
|
506
|
+
React.createElement(
|
|
512
507
|
Card.Title,
|
|
513
508
|
null,
|
|
514
509
|
row.title
|
|
515
510
|
)
|
|
516
511
|
),
|
|
517
|
-
_this2.props.showPublished && row.published &&
|
|
512
|
+
_this2.props.showPublished && row.published && React.createElement(
|
|
518
513
|
Card.Subtitle,
|
|
519
514
|
{ style: { marginTop: 0 } },
|
|
520
515
|
moment(row.published).format('MMMM DD, YYYY')
|
|
521
516
|
),
|
|
522
|
-
_this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 &&
|
|
517
|
+
_this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 && React.createElement(
|
|
523
518
|
LazyLoad,
|
|
524
519
|
{ height: 50 },
|
|
525
|
-
|
|
520
|
+
React.createElement(AuthorComponent, { key: index.toString(), index: index, authors: row.authorMapping })
|
|
526
521
|
),
|
|
527
|
-
|
|
522
|
+
React.createElement(
|
|
528
523
|
Card.Text,
|
|
529
524
|
{ className: index === 0 || index % 4 === 0 ? '' : 'card-subtext' },
|
|
530
525
|
clean_html_1(row.summary)
|
|
@@ -533,62 +528,62 @@ var GridContent = function (_React$Component) {
|
|
|
533
528
|
)
|
|
534
529
|
)
|
|
535
530
|
),
|
|
536
|
-
showVideo && (posts.length < numberOfItemsBeforeVideo || index + 1 === numberOfItemsBeforeVideo) &&
|
|
531
|
+
showVideo && (posts.length < numberOfItemsBeforeVideo || index + 1 === numberOfItemsBeforeVideo) && React.createElement(VideoPlayer, null),
|
|
537
532
|
main_43 && _this2.props.rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && _this2.renderMobileAd(index, numberOfItemsBeforeAd)
|
|
538
533
|
);
|
|
539
534
|
} else {
|
|
540
|
-
return
|
|
541
|
-
|
|
535
|
+
return React.createElement(
|
|
536
|
+
React.Fragment,
|
|
542
537
|
{ key: itemCounter },
|
|
543
|
-
|
|
538
|
+
React.createElement(
|
|
544
539
|
VisibilitySensor,
|
|
545
540
|
{
|
|
546
541
|
partialVisibility: true,
|
|
547
542
|
onChange: function onChange(isVisible) {
|
|
548
543
|
isVisible && _this2.changePageNumber(1, itemsPerPage, index);
|
|
549
544
|
} },
|
|
550
|
-
|
|
545
|
+
React.createElement(
|
|
551
546
|
'div',
|
|
552
547
|
{ counter: itemCounter++, style: { display: 'flex', flex: '1 0 auto' } },
|
|
553
|
-
|
|
548
|
+
React.createElement(
|
|
554
549
|
Card,
|
|
555
550
|
{ className: 'content-card', style: { flexDirection: index === 0 || index % 4 === 0 ? 'top' : 'row' } },
|
|
556
|
-
(row.thumbnail && row.thumbnail.asset || _this2.props.defaultImage) &&
|
|
551
|
+
(row.thumbnail && row.thumbnail.asset || _this2.props.defaultImage) && React.createElement(
|
|
557
552
|
'a',
|
|
558
553
|
{ href: row.url.current, className: index === 0 || index % 4 === 0 ? '' : 'card-image' },
|
|
559
|
-
|
|
554
|
+
React.createElement(
|
|
560
555
|
LazyLoad,
|
|
561
556
|
{ height: _this2.props.imageHeight },
|
|
562
|
-
|
|
557
|
+
React.createElement(Card.Img, {
|
|
563
558
|
variant: 'top',
|
|
564
559
|
src: _this2.renderCardImage(row, page),
|
|
565
560
|
alt: row.thumbnail && row.thumbnail.asset ? row.thumbnail.asset.originalFilename : ''
|
|
566
561
|
})
|
|
567
562
|
)
|
|
568
563
|
),
|
|
569
|
-
|
|
564
|
+
React.createElement(
|
|
570
565
|
Card.Body,
|
|
571
566
|
null,
|
|
572
|
-
|
|
567
|
+
React.createElement(
|
|
573
568
|
'a',
|
|
574
569
|
{ href: row.url.current },
|
|
575
|
-
|
|
570
|
+
React.createElement(
|
|
576
571
|
Card.Title,
|
|
577
572
|
null,
|
|
578
573
|
row.title
|
|
579
574
|
)
|
|
580
575
|
),
|
|
581
|
-
_this2.props.showPublished && row.published &&
|
|
576
|
+
_this2.props.showPublished && row.published && React.createElement(
|
|
582
577
|
Card.Subtitle,
|
|
583
578
|
{ style: { marginTop: 0 } },
|
|
584
579
|
moment(row.published).format('MMMM DD, YYYY')
|
|
585
580
|
),
|
|
586
|
-
_this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 &&
|
|
581
|
+
_this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 && React.createElement(
|
|
587
582
|
LazyLoad,
|
|
588
583
|
{ height: 50 },
|
|
589
|
-
|
|
584
|
+
React.createElement(AuthorComponent, { key: index.toString(), index: index, authors: row.authorMapping })
|
|
590
585
|
),
|
|
591
|
-
|
|
586
|
+
React.createElement(
|
|
592
587
|
Card.Text,
|
|
593
588
|
{ className: index === 0 || index % 4 === 0 ? '' : 'card-subtext' },
|
|
594
589
|
clean_html_1(row.summary)
|
|
@@ -597,71 +592,71 @@ var GridContent = function (_React$Component) {
|
|
|
597
592
|
)
|
|
598
593
|
)
|
|
599
594
|
),
|
|
600
|
-
showVideo && (posts.length < numberOfItemsBeforeVideo || index + 1 === numberOfItemsBeforeVideo) &&
|
|
595
|
+
showVideo && (posts.length < numberOfItemsBeforeVideo || index + 1 === numberOfItemsBeforeVideo) && React.createElement(VideoPlayer, null),
|
|
601
596
|
main_43 && _this2.props.rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && _this2.renderMobileAd(index, numberOfItemsBeforeAd)
|
|
602
597
|
);
|
|
603
598
|
}
|
|
604
599
|
} else if (row._type === 'lg-infeed' && row.adUnit) {
|
|
605
|
-
return
|
|
600
|
+
return React.createElement(ADlgInfeed, _extends({ index: index }, row));
|
|
606
601
|
} else if (row._type === 'brandInsightAd' && row.adUnit) {
|
|
607
|
-
return
|
|
602
|
+
return React.createElement(ADInfeed, { index: index, infeedAd: row });
|
|
608
603
|
}
|
|
609
604
|
if (index + 1 > heroContent + featureCount && (!row._type || !['lg-infeed', 'brandInsightAd'].includes(row._type))) {
|
|
610
|
-
return
|
|
611
|
-
|
|
605
|
+
return React.createElement(
|
|
606
|
+
React.Fragment,
|
|
612
607
|
{ key: itemCounter },
|
|
613
|
-
|
|
608
|
+
React.createElement(
|
|
614
609
|
VisibilitySensor,
|
|
615
610
|
{
|
|
616
611
|
onChange: function onChange(isVisible) {
|
|
617
612
|
// Passing 'articleCount' instead of index because index will be including the indexes of ads whereas articleCount will be having index of article only.
|
|
618
613
|
isVisible && _this2.changePageNumber(pageNumber, itemsPerPage, row.articleCount ? row.articleCount : index);
|
|
619
614
|
} },
|
|
620
|
-
|
|
615
|
+
React.createElement(
|
|
621
616
|
'div',
|
|
622
617
|
{ counter: itemCounter++, style: { display: 'flex', flex: '1 0 auto' } },
|
|
623
|
-
|
|
618
|
+
React.createElement(
|
|
624
619
|
Card,
|
|
625
620
|
{ className: 'content-card', style: { flexDirection: index === 0 || index % 4 === 0 ? 'top' : 'row' } },
|
|
626
|
-
(row.thumbnail && row.thumbnail.asset || _this2.props.defaultImage) &&
|
|
621
|
+
(row.thumbnail && row.thumbnail.asset || _this2.props.defaultImage) && React.createElement(
|
|
627
622
|
'a',
|
|
628
623
|
{ href: linkHref, className: index === 0 || index % 4 === 0 ? '' : 'card-image' },
|
|
629
|
-
|
|
624
|
+
React.createElement(
|
|
630
625
|
LazyLoad,
|
|
631
626
|
{ height: _this2.props.imageHeight },
|
|
632
|
-
|
|
627
|
+
React.createElement(Card.Img, {
|
|
633
628
|
variant: 'top',
|
|
634
629
|
src: _this2.renderCardImage(row, page),
|
|
635
630
|
alt: row.thumbnail && row.thumbnail.asset ? row.thumbnail.asset.originalFilename : ''
|
|
636
631
|
})
|
|
637
632
|
)
|
|
638
633
|
),
|
|
639
|
-
|
|
634
|
+
React.createElement(
|
|
640
635
|
Card.Body,
|
|
641
636
|
null,
|
|
642
|
-
|
|
637
|
+
React.createElement(
|
|
643
638
|
'a',
|
|
644
639
|
{ href: linkHref },
|
|
645
|
-
|
|
640
|
+
React.createElement(
|
|
646
641
|
Card.Title,
|
|
647
642
|
null,
|
|
648
643
|
row.title
|
|
649
644
|
)
|
|
650
645
|
),
|
|
651
|
-
_this2.props.showPublished && row.published &&
|
|
646
|
+
_this2.props.showPublished && row.published && React.createElement(
|
|
652
647
|
Card.Subtitle,
|
|
653
648
|
{ style: { marginTop: 0 } },
|
|
654
649
|
moment(row.published).format('MMMM DD, YYYY')
|
|
655
650
|
),
|
|
656
|
-
_this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 &&
|
|
651
|
+
_this2.props.showAuthor && row.authorMapping && row.authorMapping.length > 0 && React.createElement(
|
|
657
652
|
LazyLoad,
|
|
658
653
|
{ height: 50 },
|
|
659
|
-
|
|
654
|
+
React.createElement(AuthorComponent, { key: index.toString(), index: index, authors: row.authorMapping })
|
|
660
655
|
),
|
|
661
|
-
_this2.props.showCategory && row.contentCategory &&
|
|
656
|
+
_this2.props.showCategory && row.contentCategory && React.createElement(
|
|
662
657
|
LazyLoad,
|
|
663
658
|
{ height: 50 },
|
|
664
|
-
|
|
659
|
+
React.createElement(
|
|
665
660
|
'p',
|
|
666
661
|
{
|
|
667
662
|
className: 'article-category',
|
|
@@ -676,7 +671,7 @@ var GridContent = function (_React$Component) {
|
|
|
676
671
|
getContentCategory(row.contentCategory.name, contentCategoryMapping)
|
|
677
672
|
)
|
|
678
673
|
),
|
|
679
|
-
|
|
674
|
+
React.createElement(
|
|
680
675
|
Card.Text,
|
|
681
676
|
{ className: index === 0 || index % 4 === 0 ? '' : 'card-subtext' },
|
|
682
677
|
clean_html_1(row.summary)
|
|
@@ -685,17 +680,17 @@ var GridContent = function (_React$Component) {
|
|
|
685
680
|
)
|
|
686
681
|
)
|
|
687
682
|
),
|
|
688
|
-
showVideo && (posts.length < numberOfItemsBeforeVideo || index + 1 === numberOfItemsBeforeVideo) &&
|
|
683
|
+
showVideo && (posts.length < numberOfItemsBeforeVideo || index + 1 === numberOfItemsBeforeVideo) && React.createElement(VideoPlayer, null),
|
|
689
684
|
main_43 && _this2.props.rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && _this2.renderMobileAd(index, numberOfItemsBeforeAd)
|
|
690
685
|
);
|
|
691
686
|
} else return null;
|
|
692
|
-
}) :
|
|
687
|
+
}) : React.createElement(
|
|
693
688
|
'div',
|
|
694
689
|
null,
|
|
695
|
-
|
|
690
|
+
React.createElement(
|
|
696
691
|
'h5',
|
|
697
692
|
null,
|
|
698
|
-
|
|
693
|
+
React.createElement(
|
|
699
694
|
'em',
|
|
700
695
|
null,
|
|
701
696
|
'New content coming soon, please check back later.'
|
|
@@ -720,29 +715,29 @@ var GridContent = function (_React$Component) {
|
|
|
720
715
|
brandInsight = _props.brandInsight;
|
|
721
716
|
|
|
722
717
|
|
|
723
|
-
return
|
|
718
|
+
return React.createElement(
|
|
724
719
|
'div',
|
|
725
720
|
{ className: 'contentDeck' },
|
|
726
|
-
autoScroll ?
|
|
721
|
+
autoScroll ? React.createElement(
|
|
727
722
|
InfiniteScroll,
|
|
728
723
|
{ dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling },
|
|
729
|
-
|
|
724
|
+
React.createElement(
|
|
730
725
|
Container,
|
|
731
726
|
null,
|
|
732
727
|
this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.lgInfeedAd, this.state.contentCategoryMapping)
|
|
733
728
|
)
|
|
734
|
-
) :
|
|
735
|
-
|
|
729
|
+
) : React.createElement(
|
|
730
|
+
React.Fragment,
|
|
736
731
|
null,
|
|
737
|
-
|
|
732
|
+
React.createElement(
|
|
738
733
|
Container,
|
|
739
734
|
null,
|
|
740
735
|
this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.lgInfeedAd, this.state.contentCategoryMapping)
|
|
741
736
|
),
|
|
742
|
-
|
|
737
|
+
React.createElement(
|
|
743
738
|
'div',
|
|
744
739
|
{ style: { padding: '0px 10px' } },
|
|
745
|
-
this.state.scrolling ?
|
|
740
|
+
this.state.scrolling ? React.createElement(
|
|
746
741
|
'button',
|
|
747
742
|
{
|
|
748
743
|
style: { margin: 'auto', width: '100%' },
|
|
@@ -750,17 +745,17 @@ var GridContent = function (_React$Component) {
|
|
|
750
745
|
_this3.loadMore();
|
|
751
746
|
} },
|
|
752
747
|
'Load More'
|
|
753
|
-
) :
|
|
748
|
+
) : React.createElement(
|
|
754
749
|
'p',
|
|
755
750
|
{ style: { textAlign: 'center' } },
|
|
756
|
-
|
|
751
|
+
React.createElement(
|
|
757
752
|
'b',
|
|
758
753
|
null,
|
|
759
754
|
'End of data'
|
|
760
755
|
)
|
|
761
756
|
)
|
|
762
757
|
),
|
|
763
|
-
|
|
758
|
+
React.createElement(
|
|
764
759
|
'noscript',
|
|
765
760
|
null,
|
|
766
761
|
this.renderManualPagination()
|
|
@@ -771,8 +766,8 @@ var GridContent = function (_React$Component) {
|
|
|
771
766
|
}]);
|
|
772
767
|
|
|
773
768
|
return GridContent;
|
|
774
|
-
}(
|
|
769
|
+
}(React.Component);
|
|
775
770
|
|
|
776
|
-
var GridContent$1 =
|
|
771
|
+
var GridContent$1 = React.memo(withRouter(GridContent));
|
|
777
772
|
|
|
778
773
|
export default GridContent$1;
|