@mjhls/mjh-framework 1.0.884-beta.0 → 1.0.884-beta.1

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 (91) hide show
  1. package/dist/cjs/AD.js +1 -1
  2. package/dist/cjs/AlgoliaSearch.js +1 -1
  3. package/dist/cjs/ArticleProgramLandingPage.js +6 -6
  4. package/dist/cjs/ArticleSeriesLandingPage.js +4 -4
  5. package/dist/cjs/ArticleSeriesListing.js +1 -1
  6. package/dist/cjs/ContentCardPaginated.js +409 -0
  7. package/dist/cjs/DeckContent.js +1 -1
  8. package/dist/cjs/DeckQueue.js +1 -1
  9. package/dist/cjs/DeckQueuePaginated.js +340 -0
  10. package/dist/cjs/{Dfp-14d2455c.js → Dfp-f492f985.js} +2 -2
  11. package/dist/cjs/ExternalResources.js +2 -2
  12. package/dist/cjs/GridContent.js +4 -116
  13. package/dist/cjs/GridContentPaginated.js +699 -0
  14. package/dist/cjs/HorizontalArticleListing.js +2 -2
  15. package/dist/cjs/ImageSlider-38f25e66.js +3989 -0
  16. package/dist/cjs/IssueLanding.js +2 -2
  17. package/dist/cjs/MasterDeck.js +1 -1
  18. package/dist/cjs/MasterDeckPaginated.js +444 -0
  19. package/dist/cjs/MediaSeriesCard-8d27612b.js +9411 -0
  20. package/dist/cjs/MediaSeriesLanding.js +26 -9415
  21. package/dist/cjs/MediaSeriesLandingPaginated.js +522 -0
  22. package/dist/cjs/Pagination-2f76381b.js +51 -0
  23. package/dist/cjs/PartnerDetailListing.js +15 -3986
  24. package/dist/cjs/PartnerDetailListingPaginated.js +312 -0
  25. package/dist/cjs/PublicationFeature-28c549f2.js +126 -0
  26. package/dist/cjs/QueueDeckExpandedPaginated.js +1378 -0
  27. package/dist/cjs/TaxonomyDescription.js +2 -2
  28. package/dist/cjs/VideoProgramLandingPage.js +5 -5
  29. package/dist/cjs/VideoSeriesLandingPage.js +4 -4
  30. package/dist/cjs/VideoSeriesListing.js +1 -1
  31. package/dist/cjs/View.js +83 -3
  32. package/dist/cjs/faundadb.js +15 -15
  33. package/dist/cjs/getRootDocGroup.js +3 -3
  34. package/dist/cjs/getSerializers.js +2 -2
  35. package/dist/cjs/{index-396089c0.js → index-54adcbc3.js} +1 -1
  36. package/dist/cjs/index.js +4 -4
  37. package/dist/cjs/{inherits-cba9c846.js → inherits-12d44cca.js} +2 -2
  38. package/dist/esm/{ADInfeed-8a038df9.js → ADInfeed-d767ebe2.js} +2 -2
  39. package/dist/esm/ArticleProgramLandingPage.js +1 -1
  40. package/dist/esm/ArticleSeriesLandingPage.js +1 -1
  41. package/dist/esm/ArticleSeriesListing.js +2 -2
  42. package/dist/esm/Column1.js +4 -4
  43. package/dist/esm/Column2.js +5 -5
  44. package/dist/esm/Column3.js +6 -6
  45. package/dist/esm/ContentCardPaginated.js +403 -0
  46. package/dist/esm/DeckContent.js +16 -16
  47. package/dist/esm/DeckQueue.js +18 -18
  48. package/dist/esm/DeckQueuePaginated.js +334 -0
  49. package/dist/esm/EventsDeck.js +26 -26
  50. package/dist/esm/ExternalResources.js +3 -3
  51. package/dist/esm/GridContent.js +38 -150
  52. package/dist/esm/GridContentPaginated.js +693 -0
  53. package/dist/esm/HamMagazine.js +4 -4
  54. package/dist/esm/HorizontalArticleListing.js +1 -1
  55. package/dist/esm/ImageSlider-a3154b97.js +3980 -0
  56. package/dist/esm/IssueContentDeck.js +14 -14
  57. package/dist/esm/IssueDeck.js +22 -22
  58. package/dist/esm/IssueLanding.js +2 -2
  59. package/dist/esm/MasterDeck.js +4 -4
  60. package/dist/esm/MasterDeckPaginated.js +438 -0
  61. package/dist/esm/MediaSeriesCard-1dd7eae8.js +9403 -0
  62. package/dist/esm/MediaSeriesLanding.js +23 -9411
  63. package/dist/esm/MediaSeriesLandingPaginated.js +517 -0
  64. package/dist/esm/NavDvm.js +3 -3
  65. package/dist/esm/NavMagazine.js +4 -4
  66. package/dist/esm/NavNative.js +5 -5
  67. package/dist/esm/Pagination-c0db7ca1.js +46 -0
  68. package/dist/esm/PartnerDetailListing.js +12 -3982
  69. package/dist/esm/PartnerDetailListingPaginated.js +307 -0
  70. package/dist/esm/PubSection.js +1 -1
  71. package/dist/esm/PublicationDeck.js +18 -18
  72. package/dist/esm/PublicationFeature-fa24dedb.js +121 -0
  73. package/dist/esm/PublicationLanding.js +22 -22
  74. package/dist/esm/QueueDeckExpanded.js +1 -1
  75. package/dist/esm/QueueDeckExpandedPaginated.js +1372 -0
  76. package/dist/esm/RolesDeck.js +12 -12
  77. package/dist/esm/Search.js +2 -2
  78. package/dist/esm/{SocialSearchComponent-b5be0e6c.js → SocialSearchComponent-dca69151.js} +3 -3
  79. package/dist/esm/TaxonomyCard.js +16 -16
  80. package/dist/esm/TaxonomyDescription.js +1 -1
  81. package/dist/esm/TemplateNormal.js +4 -4
  82. package/dist/esm/VideoProgramLandingPage.js +6 -6
  83. package/dist/esm/VideoSeriesLandingPage.js +1 -1
  84. package/dist/esm/VideoSeriesListing.js +3 -3
  85. package/dist/esm/View.js +84 -4
  86. package/dist/esm/getSerializers.js +1 -1
  87. package/dist/esm/{index-0e04b7d7.js → index-d1476645.js} +19 -19
  88. package/dist/esm/index.js +10 -9
  89. package/package.json +2 -1
  90. package/dist/cjs/Schema.js +0 -100
  91. package/dist/esm/Schema.js +0 -95
@@ -0,0 +1,1378 @@
1
+ 'use strict';
2
+
3
+ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4
+
5
+ require('./_commonjsHelpers-06173234.js');
6
+ require('./core.get-iterator-method-f3c44602.js');
7
+ require('./_library-dd23b178.js');
8
+ require('./_iter-detect-05795553.js');
9
+ var toConsumableArray = require('./toConsumableArray-c9b8a0d0.js');
10
+ require('./_object-pie-68c5bcbc.js');
11
+ var _extends$1 = require('./extends-eed4f016.js');
12
+ require('./web.dom.iterable-e34bf324.js');
13
+ var React = require('react');
14
+ var React__default = _interopDefault(React);
15
+ require('./events-1b438fe7.js');
16
+ var index = require('./index-98e01cb9.js');
17
+ require('prop-types');
18
+ require('react-bootstrap/Card');
19
+ var moment = require('./moment-575fe24c.js');
20
+ var Router = require('next/router');
21
+ var Router__default = _interopDefault(Router);
22
+ require('./isSymbol-04666465.js');
23
+ require('./debounce-529c8d06.js');
24
+ require('./toNumber-36d1e7e5.js');
25
+ require('react-dom');
26
+ var slicedToArray = require('./slicedToArray-f6d4eaa8.js');
27
+ require('./index-be0c82be.js');
28
+ var urlFor = require('./urlFor.js');
29
+ var index$2 = require('./index-96b3db50.js');
30
+ var main = require('./main-02daeefe.js');
31
+ var entities = require('./entities-310b46ee.js');
32
+ require('./stringify-bbc68047.js');
33
+ var asyncToGenerator = require('./asyncToGenerator-df19209d.js');
34
+ require('./Segment.js');
35
+ require('./Beam.js');
36
+ require('./AdSlot.js');
37
+ var ADInfeed = require('./ADInfeed-2e48af77.js');
38
+ var lodash = require('./lodash-fc2922d0.js');
39
+ var ADlgInfeed = require('./ADlgInfeed-c39c7131.js');
40
+ var getContentCategory = require('./getContentCategory-f38a4c00.js');
41
+ var AuthorComponent = require('./AuthorComponent-02e827ae.js');
42
+ var reactBootstrap = require('react-bootstrap');
43
+ var timeDifferenceCalc = require('./timeDifferenceCalc.js');
44
+ require('react-paginate');
45
+ var Pagination = require('./Pagination-2f76381b.js');
46
+
47
+ var _this = undefined;
48
+
49
+ var renderCardImage = function renderCardImage(row, client) {
50
+ var imageHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
51
+ var imageWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
52
+ var imageMaxHeight = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
53
+ var imageFit = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
54
+ return urlFor({ client: client, source: row.thumbnail, imageHeight: imageHeight, imageWidth: imageWidth, imageMaxHeight: imageMaxHeight, imageFit: imageFit });
55
+ };
56
+
57
+ var checkExternalUrl = function checkExternalUrl(url) {
58
+ return new RegExp(['http', 'https'].join('|')).test(url);
59
+ };
60
+
61
+ var CardLoader = function CardLoader(_ref) {
62
+ var data = _ref.data,
63
+ client = _ref.client,
64
+ mapping = _ref.mapping,
65
+ showPublished = _ref.showPublished,
66
+ defaultImage = _ref.defaultImage,
67
+ showAuthor = _ref.showAuthor,
68
+ showCategory = _ref.showCategory,
69
+ imageHeight = _ref.imageHeight,
70
+ imageWidth = _ref.imageWidth,
71
+ imageMaxHeight = _ref.imageMaxHeight,
72
+ imageFit = _ref.imageFit,
73
+ rightItems = _ref.rightItems,
74
+ brandInsightAd = _ref.brandInsightAd,
75
+ showBI = _ref.showBI,
76
+ heroContent = _ref.heroContent,
77
+ lgInfeedAd = _ref.lgInfeedAd,
78
+ showPubInfo = _ref.showPubInfo,
79
+ contentCategoryMapping = _ref.contentCategoryMapping,
80
+ showTimeDiff = _ref.showTimeDiff,
81
+ showTaxonomies = _ref.showTaxonomies,
82
+ showIntro = _ref.showIntro;
83
+
84
+ var numberOfItemsBeforeAd = data.length < 6 ? data.length : 6;
85
+ var insertBrandInsightAd = function insertBrandInsightAd(arr, index, newElement) {
86
+ return [].concat(toConsumableArray._toConsumableArray(arr.slice(0, index)), [newElement], toConsumableArray._toConsumableArray(arr.slice(index)));
87
+ };
88
+
89
+ var _useState = React.useState(!showBI || !brandInsightAd ? true : false),
90
+ _useState2 = slicedToArray._slicedToArray(_useState, 2),
91
+ dataRemapped = _useState2[0],
92
+ setDataRemapped = _useState2[1];
93
+ // Need to pass flag "lgInfeedAd={true}" along with brandInsightAd from site level for large infeed-ad to render
94
+ // Checking window and lgInfeedAd flag in desktop view ( window >= 1400px ).
95
+
96
+
97
+ if (lgInfeedAd && brandInsightAd && typeof window !== 'undefined' && window.innerWidth >= 1400) {
98
+ var lgInfeed = {
99
+ _type: 'lg-infeed',
100
+ adUnit: brandInsightAd.adUnit,
101
+ className: 'lg-infeed',
102
+ networkID: brandInsightAd.networkID,
103
+ sizes: [728, 90],
104
+ // Adding sizeMapping for showing ad above 1400px
105
+ sizeMapping: [{
106
+ viewport: [1400, 0],
107
+ sizes: [[728, 90]]
108
+ }, { viewport: [0, 0], sizes: [] }],
109
+ targeting: {
110
+ content_placement: brandInsightAd.targeting.content_placement,
111
+ document_url: brandInsightAd.targeting.document_url,
112
+ rootDocumentGroup: brandInsightAd.targeting.rootDocumentGroup
113
+ },
114
+ /* Passing refresh flag */
115
+ refreshFlag: brandInsightAd.refreshFlag ? brandInsightAd.refreshFlag : false
116
+ };
117
+
118
+ var chunks = lodash.lodash.chunk(data, 6).map(function (chunk) {
119
+ var set = lodash.lodash.chunk(chunk, 2);
120
+ for (var i = 0; i < set.length; i++) {
121
+ if (i !== set.length - 1) {
122
+ set[i].push(lgInfeed);
123
+ }
124
+ }
125
+ return lodash.lodash.flattenDeep(set);
126
+ });
127
+ data = lodash.lodash.flatten(chunks);
128
+ !dataRemapped && setDataRemapped(true); // To detect if appending of insights ads are completed
129
+ }
130
+
131
+ // set dataRemap to true as there are no infeed or BI ads or window width is less than limit
132
+ React.useEffect(function () {
133
+ if (typeof window !== 'undefined' && (!lgInfeedAd || !brandInsightAd || window.innerWidth < 1400) && !dataRemapped) {
134
+ setDataRemapped(true);
135
+ }
136
+ }, []);
137
+
138
+ if (showBI && brandInsightAd) {
139
+ // Checking window and lgInfeedAd flag in desktop view ( window >= 1400px ).
140
+ if (lgInfeedAd && typeof window !== 'undefined' && window.innerWidth >= 1400) brandInsightAd.interval = 8;
141
+ var pos = 0;
142
+ for (var i = 1; pos < data.length; i++) {
143
+ var inFeedAd = {
144
+ adUnit: brandInsightAd.adUnit,
145
+ className: brandInsightAd.className,
146
+ networkID: brandInsightAd.networkID,
147
+ sizes: brandInsightAd.sizes,
148
+ slotId: brandInsightAd.slotId + '_' + i,
149
+ targeting: {
150
+ pos: 'infeed',
151
+ content_placement: brandInsightAd.targeting.content_placement,
152
+ document_url: brandInsightAd.targeting.document_url,
153
+ rootDocumentGroup: brandInsightAd.targeting.rootDocumentGroup
154
+ },
155
+ _type: 'brandInsightAd',
156
+ /* Passing refresh flag */
157
+ refreshFlag: brandInsightAd.refreshFlag ? brandInsightAd.refreshFlag : false
158
+ };
159
+
160
+ data = insertBrandInsightAd(data, pos, inFeedAd);
161
+ pos += brandInsightAd.interval + 1;
162
+ }
163
+ }
164
+
165
+ data = data.map(function (ele, i) {
166
+ if (ele._type === 'lg-infeed') {
167
+ // Setting pos as top2 for the first occurence of large infeed ad
168
+ // const pos = data.indexOf(data.find((d) => d._type === 'lg-infeed')) === i ? 'top2' : `lg-infeed_${i}`
169
+ return _extends$1._extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends$1._extends({}, ele.targeting, { pos: 'lg-infeed' }) });
170
+ } else return ele;
171
+ });
172
+
173
+ var featureCount = 0;
174
+ return React__default.createElement(
175
+ 'div',
176
+ null,
177
+ data && data.length > 0 ? dataRemapped ? // For Javascript Enabled Cases
178
+ data.map(function (article, index) {
179
+ var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
180
+
181
+ if (article._type === 'feature') {
182
+ featureCount++;
183
+ if (article.blank || checkExternalUrl(article.url.current)) {
184
+ return React__default.createElement(
185
+ reactBootstrap.Media,
186
+ {
187
+ key: article._id ? article._id : index,
188
+ className: 'feature-media',
189
+ style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
190
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
191
+ 'a',
192
+ { rel: 'noopener', href: article.url.current, target: '_blank', className: 'feature-wrapper' },
193
+ React__default.createElement(
194
+ index$2.LazyLoad,
195
+ { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
196
+ article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
197
+ ),
198
+ article.source && React__default.createElement(
199
+ 'div',
200
+ { className: 'content-category-label' },
201
+ React__default.createElement(
202
+ 'div',
203
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
204
+ article.source
205
+ )
206
+ )
207
+ ),
208
+ React__default.createElement(
209
+ reactBootstrap.Media.Body,
210
+ null,
211
+ React__default.createElement(
212
+ 'a',
213
+ { rel: 'noopener', href: article.url.current, target: '_blank' },
214
+ article.title && React__default.createElement(
215
+ 'h4',
216
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
217
+ article.title
218
+ )
219
+ ),
220
+ showPublished && !showTimeDiff && article.published && React__default.createElement(
221
+ 'p',
222
+ { className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
223
+ moment.moment(article.published).format('MMMM DD, YYYY')
224
+ ),
225
+ showTimeDiff && article.published && React__default.createElement(
226
+ 'p',
227
+ { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
228
+ showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
229
+ if (index > 3) {
230
+ return null;
231
+ }
232
+ if (index === 3) {
233
+ return React__default.createElement(
234
+ React__default.Fragment,
235
+ null,
236
+ React__default.createElement(
237
+ 'em',
238
+ { style: { marginRight: '.5rem' } },
239
+ '...'
240
+ )
241
+ );
242
+ }
243
+ return React__default.createElement(
244
+ React__default.Fragment,
245
+ null,
246
+ React__default.createElement(
247
+ 'em',
248
+ null,
249
+ taxonomy.name
250
+ ),
251
+ ' |',
252
+ ' '
253
+ );
254
+ }),
255
+ ' ',
256
+ React__default.createElement(
257
+ 'span',
258
+ { style: { display: 'inline-block' } },
259
+ timeDifferenceCalc(article.published)
260
+ )
261
+ ),
262
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
263
+ index$2.LazyLoad,
264
+ { height: 50 },
265
+ React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
266
+ ),
267
+ !article.thumbnail && !defaultImage && article.source && React__default.createElement(
268
+ 'div',
269
+ { className: 'content-category-label' },
270
+ React__default.createElement(
271
+ 'div',
272
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
273
+ article.source
274
+ )
275
+ ),
276
+ React__default.createElement(
277
+ 'div',
278
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
279
+ showCategory && article.contentCategory && React__default.createElement(
280
+ 'p',
281
+ {
282
+ className: 'article-category',
283
+ style: {
284
+ background: '#3FB618',
285
+ color: '#ffffff',
286
+ marginBottom: '.25rem',
287
+ display: 'inline-block',
288
+ padding: '0 .25rem',
289
+ fontSize: '.8rem'
290
+ } },
291
+ getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
292
+ ),
293
+ article.issueSection && article.issueSection.name && React__default.createElement(
294
+ 'p',
295
+ {
296
+ className: 'issueSection',
297
+ style: {
298
+ background: '#000000',
299
+ color: '#ffffff',
300
+ marginBottom: '.25rem',
301
+ marginLeft: '.25rem',
302
+ display: 'inline-block',
303
+ padding: '0 .25rem',
304
+ fontSize: '.8rem'
305
+ } },
306
+ article.issueSection.name
307
+ )
308
+ ),
309
+ showPubInfo && (article.issue || article.volume) && React__default.createElement(
310
+ 'div',
311
+ { className: 'pubInfo' },
312
+ article.volume && React__default.createElement(
313
+ 'p',
314
+ { className: 'qdeVolume' },
315
+ article.volume
316
+ ),
317
+ article.issue && React__default.createElement(
318
+ 'p',
319
+ { className: 'qdeIssue' },
320
+ article.issue
321
+ )
322
+ ),
323
+ showIntro && article.summary && React__default.createElement(
324
+ 'p',
325
+ { className: 'pt-2 card-text' },
326
+ entities.clean_html_1(article.summary)
327
+ )
328
+ )
329
+ );
330
+ } else {
331
+ return React__default.createElement(
332
+ reactBootstrap.Media,
333
+ {
334
+ key: article._id ? article._id : index,
335
+ className: 'feature-media',
336
+ style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
337
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
338
+ 'a',
339
+ { href: article.url.current, className: 'feature-wrapper' },
340
+ React__default.createElement(
341
+ index$2.LazyLoad,
342
+ { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
343
+ article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
344
+ ),
345
+ article.source && React__default.createElement(
346
+ 'div',
347
+ { className: 'content-category-label' },
348
+ React__default.createElement(
349
+ 'div',
350
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
351
+ article.source
352
+ )
353
+ )
354
+ ),
355
+ React__default.createElement(
356
+ reactBootstrap.Media.Body,
357
+ null,
358
+ React__default.createElement(
359
+ 'a',
360
+ { href: article.url.current },
361
+ article.title && React__default.createElement(
362
+ 'h4',
363
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
364
+ article.title
365
+ )
366
+ ),
367
+ showPublished && !showTimeDiff && article.published && React__default.createElement(
368
+ 'p',
369
+ { className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
370
+ moment.moment(article.published).format('MMMM DD, YYYY')
371
+ ),
372
+ showTimeDiff && article.published && React__default.createElement(
373
+ 'p',
374
+ { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
375
+ showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
376
+ if (index > 3) {
377
+ return null;
378
+ }
379
+ if (index === 3) {
380
+ return React__default.createElement(
381
+ React__default.Fragment,
382
+ null,
383
+ React__default.createElement(
384
+ 'em',
385
+ { style: { marginRight: '.5rem' } },
386
+ '...'
387
+ )
388
+ );
389
+ }
390
+ if (index === 3) {
391
+ return React__default.createElement(
392
+ React__default.Fragment,
393
+ null,
394
+ React__default.createElement(
395
+ 'em',
396
+ { style: { marginRight: '.5rem' } },
397
+ '...'
398
+ )
399
+ );
400
+ }
401
+ return React__default.createElement(
402
+ React__default.Fragment,
403
+ null,
404
+ React__default.createElement(
405
+ 'em',
406
+ null,
407
+ taxonomy.name
408
+ ),
409
+ ' |',
410
+ ' '
411
+ );
412
+ }),
413
+ ' ',
414
+ React__default.createElement(
415
+ 'span',
416
+ { style: { display: 'inline-block' } },
417
+ timeDifferenceCalc(article.published)
418
+ )
419
+ ),
420
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
421
+ index$2.LazyLoad,
422
+ { height: 50 },
423
+ React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
424
+ ),
425
+ !article.thumbnail && !defaultImage && article.source && React__default.createElement(
426
+ 'div',
427
+ { className: 'content-category-label' },
428
+ React__default.createElement(
429
+ 'div',
430
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
431
+ article.source
432
+ )
433
+ ),
434
+ React__default.createElement(
435
+ 'div',
436
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
437
+ showCategory && article.contentCategory && React__default.createElement(
438
+ 'p',
439
+ {
440
+ className: 'article-category',
441
+ style: {
442
+ background: '#3FB618',
443
+ color: '#ffffff',
444
+ marginBottom: '.25rem',
445
+ display: 'inline-block',
446
+ padding: '0 .25rem',
447
+ fontSize: '.8rem'
448
+ } },
449
+ getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
450
+ ),
451
+ article.issueSection && article.issueSection.name && React__default.createElement(
452
+ 'p',
453
+ {
454
+ className: 'issueSection',
455
+ style: {
456
+ background: '#000000',
457
+ color: '#ffffff',
458
+ marginBottom: '.25rem',
459
+ marginLeft: '.25rem',
460
+ display: 'inline-block',
461
+ padding: '0 .25rem',
462
+ fontSize: '.8rem'
463
+ } },
464
+ article.issueSection.name
465
+ )
466
+ ),
467
+ showPubInfo && (article.issue || article.volume) && React__default.createElement(
468
+ 'div',
469
+ { className: 'pubInfo' },
470
+ article.volume && React__default.createElement(
471
+ 'p',
472
+ { className: 'qdeVolume' },
473
+ article.volume
474
+ ),
475
+ article.issue && React__default.createElement(
476
+ 'p',
477
+ { className: 'qdeIssue' },
478
+ article.issue
479
+ )
480
+ ),
481
+ showIntro && article.summary && React__default.createElement(
482
+ 'p',
483
+ { className: 'pt-2 card-text' },
484
+ entities.clean_html_1(article.summary)
485
+ )
486
+ )
487
+ );
488
+ }
489
+ } else if (article._type === 'lg-infeed' && article.adUnit) {
490
+ return React__default.createElement(ADlgInfeed.ADlgInfeed, _extends$1._extends({ index: index }, article));
491
+ } else if (article._type === 'brandInsightAd' && article.adUnit) {
492
+ return React__default.createElement(ADInfeed.ADInfeed, { index: index, infeedAd: article });
493
+ }
494
+ if ((brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
495
+ return React__default.createElement(
496
+ React__default.Fragment,
497
+ { key: article._id ? article._id : index },
498
+ React__default.createElement(
499
+ reactBootstrap.Media,
500
+ {
501
+ key: article._id ? article._id : index,
502
+ style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
503
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
504
+ 'a',
505
+ { href: mapping[contentCategoryName] + '/' + article.url.current, className: 'img-wrapper' },
506
+ React__default.createElement(
507
+ index$2.LazyLoad,
508
+ { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
509
+ article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'mr-3 img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
510
+ ),
511
+ article.source && React__default.createElement(
512
+ 'div',
513
+ { className: 'content-category-label' },
514
+ React__default.createElement(
515
+ 'div',
516
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
517
+ article.source
518
+ )
519
+ )
520
+ ),
521
+ React__default.createElement(
522
+ reactBootstrap.Media.Body,
523
+ null,
524
+ React__default.createElement(
525
+ 'a',
526
+ { href: mapping[contentCategoryName] + '/' + article.url.current },
527
+ article.title && React__default.createElement(
528
+ 'h4',
529
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
530
+ article.title
531
+ )
532
+ ),
533
+ showPublished && !showTimeDiff && article.published && React__default.createElement(
534
+ 'p',
535
+ { className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
536
+ moment.moment(article.published).format('MMMM DD, YYYY')
537
+ ),
538
+ showTimeDiff && article.published && React__default.createElement(
539
+ 'p',
540
+ { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
541
+ showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
542
+ if (index > 3) {
543
+ return null;
544
+ }
545
+ if (index === 3) {
546
+ return React__default.createElement(
547
+ React__default.Fragment,
548
+ null,
549
+ React__default.createElement(
550
+ 'em',
551
+ { style: { marginRight: '.5rem' } },
552
+ '...'
553
+ )
554
+ );
555
+ }
556
+ return React__default.createElement(
557
+ React__default.Fragment,
558
+ null,
559
+ React__default.createElement(
560
+ 'em',
561
+ null,
562
+ taxonomy.name
563
+ ),
564
+ ' |',
565
+ ' '
566
+ );
567
+ }),
568
+ ' ',
569
+ React__default.createElement(
570
+ 'span',
571
+ { style: { display: 'inline-block' } },
572
+ timeDifferenceCalc(article.published)
573
+ )
574
+ ),
575
+ React__default.createElement(
576
+ 'div',
577
+ { className: 'author-sec', style: { lineHeight: 1.5 } },
578
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
579
+ index$2.LazyLoad,
580
+ { height: 50 },
581
+ React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
582
+ )
583
+ ),
584
+ !article.thumbnail && !defaultImage && article.source && React__default.createElement(
585
+ 'div',
586
+ { className: 'content-category-label' },
587
+ React__default.createElement(
588
+ 'div',
589
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
590
+ article.source
591
+ )
592
+ ),
593
+ React__default.createElement(
594
+ 'div',
595
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
596
+ showCategory && article.contentCategory && React__default.createElement(
597
+ 'p',
598
+ {
599
+ className: 'article-category',
600
+ style: {
601
+ background: '#3FB618',
602
+ color: '#ffffff',
603
+ marginBottom: '.25rem',
604
+ display: 'inline-block',
605
+ padding: '0 .25rem',
606
+ fontSize: '.8rem'
607
+ } },
608
+ getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
609
+ ),
610
+ article.issueSection && article.issueSection.name && React__default.createElement(
611
+ 'p',
612
+ {
613
+ className: 'issueSection',
614
+ style: {
615
+ background: '#000000',
616
+ color: '#ffffff',
617
+ marginBottom: '.25rem',
618
+ marginLeft: '.25rem',
619
+ display: 'inline-block',
620
+ padding: '0 .25rem',
621
+ fontSize: '.8rem'
622
+ } },
623
+ article.issueSection.name
624
+ )
625
+ ),
626
+ showPubInfo && (article.issue || article.volume) && React__default.createElement(
627
+ 'div',
628
+ { className: 'pubInfo' },
629
+ article.volume && React__default.createElement(
630
+ 'p',
631
+ { className: 'qdeVolume' },
632
+ article.volume
633
+ ),
634
+ article.issue && React__default.createElement(
635
+ 'p',
636
+ { className: 'qdeIssue' },
637
+ article.issue
638
+ )
639
+ ),
640
+ showIntro && article.summary && React__default.createElement(
641
+ 'p',
642
+ { className: 'pt-2 card-text' },
643
+ entities.clean_html_1(article.summary)
644
+ )
645
+ )
646
+ ),
647
+ React__default.createElement(
648
+ 'div',
649
+ null,
650
+ main.main_36 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
651
+ )
652
+ );
653
+ } else return null;
654
+ }) :
655
+ // For Javascript Disabled Cases
656
+ React__default.createElement(
657
+ 'noscript',
658
+ null,
659
+ data.map(function (article, index) {
660
+ var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
661
+
662
+ if (article._type === 'feature') {
663
+ featureCount++;
664
+ if (article.blank || checkExternalUrl(article.url.current)) {
665
+ return React__default.createElement(
666
+ reactBootstrap.Media,
667
+ {
668
+ key: article._id ? article._id : index,
669
+ className: 'feature-media',
670
+ style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
671
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
672
+ 'a',
673
+ { rel: 'noopener', href: article.url.current, target: '_blank', className: 'feature-wrapper' },
674
+ React__default.createElement(
675
+ index$2.LazyLoad,
676
+ { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
677
+ article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
678
+ ),
679
+ article.source && React__default.createElement(
680
+ 'div',
681
+ { className: 'content-category-label' },
682
+ React__default.createElement(
683
+ 'div',
684
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
685
+ article.source
686
+ )
687
+ )
688
+ ),
689
+ React__default.createElement(
690
+ reactBootstrap.Media.Body,
691
+ null,
692
+ React__default.createElement(
693
+ 'a',
694
+ { rel: 'noopener', href: article.url.current, target: '_blank' },
695
+ article.title && React__default.createElement(
696
+ 'h4',
697
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
698
+ article.title
699
+ )
700
+ ),
701
+ showPublished && article.published && React__default.createElement(
702
+ 'p',
703
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
704
+ moment.moment(article.published).format('MMMM DD, YYYY')
705
+ ),
706
+ showTimeDiff && article.published && React__default.createElement(
707
+ 'p',
708
+ { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
709
+ showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
710
+ if (index > 3) {
711
+ return null;
712
+ }
713
+ if (index === 3) {
714
+ return React__default.createElement(
715
+ React__default.Fragment,
716
+ null,
717
+ React__default.createElement(
718
+ 'em',
719
+ { style: { marginRight: '.5rem' } },
720
+ '...'
721
+ )
722
+ );
723
+ }
724
+ return React__default.createElement(
725
+ React__default.Fragment,
726
+ null,
727
+ React__default.createElement(
728
+ 'em',
729
+ null,
730
+ taxonomy.name
731
+ ),
732
+ ' |',
733
+ ' '
734
+ );
735
+ }),
736
+ ' ',
737
+ React__default.createElement(
738
+ 'span',
739
+ { style: { display: 'inline-block' } },
740
+ timeDifferenceCalc(article.published)
741
+ )
742
+ ),
743
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
744
+ index$2.LazyLoad,
745
+ { height: 50 },
746
+ React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
747
+ ),
748
+ !article.thumbnail && !defaultImage && article.source && React__default.createElement(
749
+ 'div',
750
+ { className: 'content-category-label' },
751
+ React__default.createElement(
752
+ 'div',
753
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
754
+ article.source
755
+ )
756
+ ),
757
+ React__default.createElement(
758
+ 'div',
759
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
760
+ showCategory && article.contentCategory && React__default.createElement(
761
+ 'p',
762
+ {
763
+ className: 'article-category',
764
+ style: {
765
+ background: '#3FB618',
766
+ color: '#ffffff',
767
+ marginBottom: '.25rem',
768
+ display: 'inline-block',
769
+ padding: '0 .25rem',
770
+ fontSize: '.8rem'
771
+ } },
772
+ getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
773
+ ),
774
+ article.issueSection && article.issueSection.name && React__default.createElement(
775
+ 'p',
776
+ {
777
+ className: 'issueSection',
778
+ style: {
779
+ background: '#000000',
780
+ color: '#ffffff',
781
+ marginBottom: '.25rem',
782
+ marginLeft: '.25rem',
783
+ display: 'inline-block',
784
+ padding: '0 .25rem',
785
+ fontSize: '.8rem'
786
+ } },
787
+ article.issueSection.name
788
+ )
789
+ ),
790
+ showPubInfo && (article.issue || article.volume) && React__default.createElement(
791
+ 'div',
792
+ { className: 'pubInfo' },
793
+ article.volume && React__default.createElement(
794
+ 'p',
795
+ { className: 'qdeVolume' },
796
+ article.volume
797
+ ),
798
+ article.issue && React__default.createElement(
799
+ 'p',
800
+ { className: 'qdeIssue' },
801
+ article.issue
802
+ )
803
+ ),
804
+ showIntro && article.summary && React__default.createElement(
805
+ 'p',
806
+ { className: 'pt-2 card-text' },
807
+ entities.clean_html_1(article.summary)
808
+ )
809
+ )
810
+ );
811
+ } else {
812
+ return React__default.createElement(
813
+ reactBootstrap.Media,
814
+ {
815
+ key: article._id ? article._id : index,
816
+ className: 'feature-media',
817
+ style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
818
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
819
+ 'a',
820
+ { href: article.url.current, className: 'feature-wrapper' },
821
+ React__default.createElement(
822
+ index$2.LazyLoad,
823
+ { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
824
+ article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
825
+ ),
826
+ article.source && React__default.createElement(
827
+ 'div',
828
+ { className: 'content-category-label' },
829
+ React__default.createElement(
830
+ 'div',
831
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
832
+ article.source
833
+ )
834
+ )
835
+ ),
836
+ React__default.createElement(
837
+ reactBootstrap.Media.Body,
838
+ null,
839
+ React__default.createElement(
840
+ 'a',
841
+ { href: article.url.current },
842
+ article.title && React__default.createElement(
843
+ 'h4',
844
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
845
+ article.title
846
+ )
847
+ ),
848
+ showPublished && article.published && React__default.createElement(
849
+ 'p',
850
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
851
+ moment.moment(article.published).format('MMMM DD, YYYY')
852
+ ),
853
+ showTimeDiff && article.published && React__default.createElement(
854
+ 'p',
855
+ { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
856
+ showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
857
+ if (index > 3) {
858
+ return null;
859
+ }
860
+ if (index === 3) {
861
+ return React__default.createElement(
862
+ React__default.Fragment,
863
+ null,
864
+ React__default.createElement(
865
+ 'em',
866
+ { style: { marginRight: '.5rem' } },
867
+ '...'
868
+ )
869
+ );
870
+ }
871
+ return React__default.createElement(
872
+ React__default.Fragment,
873
+ null,
874
+ React__default.createElement(
875
+ 'em',
876
+ null,
877
+ taxonomy.name
878
+ ),
879
+ ' |',
880
+ ' '
881
+ );
882
+ }),
883
+ ' ',
884
+ React__default.createElement(
885
+ 'span',
886
+ { style: { display: 'inline-block' } },
887
+ timeDifferenceCalc(article.published)
888
+ )
889
+ ),
890
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
891
+ index$2.LazyLoad,
892
+ { height: 50 },
893
+ React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
894
+ ),
895
+ !article.thumbnail && !defaultImage && article.source && React__default.createElement(
896
+ 'div',
897
+ { className: 'content-category-label' },
898
+ React__default.createElement(
899
+ 'div',
900
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
901
+ article.source
902
+ )
903
+ ),
904
+ React__default.createElement(
905
+ 'div',
906
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
907
+ showCategory && article.contentCategory && React__default.createElement(
908
+ 'p',
909
+ {
910
+ className: 'article-category',
911
+ style: {
912
+ background: '#3FB618',
913
+ color: '#ffffff',
914
+ marginBottom: '.25rem',
915
+ display: 'inline-block',
916
+ padding: '0 .25rem',
917
+ fontSize: '.8rem'
918
+ } },
919
+ getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
920
+ ),
921
+ article.issueSection && article.issueSection.name && React__default.createElement(
922
+ 'p',
923
+ {
924
+ className: 'issueSection',
925
+ style: {
926
+ background: '#000000',
927
+ color: '#ffffff',
928
+ marginBottom: '.25rem',
929
+ marginLeft: '.25rem',
930
+ display: 'inline-block',
931
+ padding: '0 .25rem',
932
+ fontSize: '.8rem'
933
+ } },
934
+ article.issueSection.name
935
+ )
936
+ ),
937
+ showPubInfo && (article.issue || article.volume) && React__default.createElement(
938
+ 'div',
939
+ { className: 'pubInfo' },
940
+ article.volume && React__default.createElement(
941
+ 'p',
942
+ { className: 'qdeVolume' },
943
+ article.volume
944
+ ),
945
+ article.issue && React__default.createElement(
946
+ 'p',
947
+ { className: 'qdeIssue' },
948
+ article.issue
949
+ )
950
+ ),
951
+ showIntro && article.summary && React__default.createElement(
952
+ 'p',
953
+ { className: 'pt-2 card-text' },
954
+ entities.clean_html_1(article.summary)
955
+ )
956
+ )
957
+ );
958
+ }
959
+ } else if (article._type === 'lg-infeed' && article.adUnit) {
960
+ return React__default.createElement(ADlgInfeed.ADlgInfeed, _extends$1._extends({ index: index }, article));
961
+ } else if (article._type === 'brandInsightAd' && article.adUnit) {
962
+ return React__default.createElement(ADInfeed.ADInfeed, { index: index, infeedAd: article });
963
+ }
964
+ if ((brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
965
+ return React__default.createElement(
966
+ React__default.Fragment,
967
+ { key: article._id ? article._id : index },
968
+ React__default.createElement(
969
+ reactBootstrap.Media,
970
+ {
971
+ key: article._id ? article._id : index,
972
+ style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
973
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
974
+ 'a',
975
+ { href: mapping[contentCategoryName] + '/' + article.url.current, className: 'img-wrapper' },
976
+ React__default.createElement(
977
+ index$2.LazyLoad,
978
+ { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
979
+ article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'mr-3 img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
980
+ ),
981
+ article.source && React__default.createElement(
982
+ 'div',
983
+ { className: 'content-category-label' },
984
+ React__default.createElement(
985
+ 'div',
986
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
987
+ article.source
988
+ )
989
+ )
990
+ ),
991
+ React__default.createElement(
992
+ reactBootstrap.Media.Body,
993
+ null,
994
+ React__default.createElement(
995
+ 'a',
996
+ { href: mapping[contentCategoryName] + '/' + article.url.current },
997
+ article.title && React__default.createElement(
998
+ 'h4',
999
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
1000
+ article.title
1001
+ )
1002
+ ),
1003
+ showPublished && article.published && React__default.createElement(
1004
+ 'p',
1005
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
1006
+ moment.moment(article.published).format('MMMM DD, YYYY')
1007
+ ),
1008
+ showTimeDiff && article.published && React__default.createElement(
1009
+ 'p',
1010
+ { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
1011
+ showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
1012
+ if (index > 3) {
1013
+ return null;
1014
+ }
1015
+ if (index === 3) {
1016
+ return React__default.createElement(
1017
+ React__default.Fragment,
1018
+ null,
1019
+ React__default.createElement(
1020
+ 'em',
1021
+ { style: { marginRight: '.5rem' } },
1022
+ '...'
1023
+ )
1024
+ );
1025
+ }
1026
+ return React__default.createElement(
1027
+ React__default.Fragment,
1028
+ null,
1029
+ React__default.createElement(
1030
+ 'em',
1031
+ null,
1032
+ taxonomy.name
1033
+ ),
1034
+ ' |',
1035
+ ' '
1036
+ );
1037
+ }),
1038
+ ' ',
1039
+ React__default.createElement(
1040
+ 'span',
1041
+ { style: { display: 'inline-block' } },
1042
+ timeDifferenceCalc(article.published)
1043
+ )
1044
+ ),
1045
+ React__default.createElement(
1046
+ 'div',
1047
+ { className: 'author-sec', style: { lineHeight: 1.5 } },
1048
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
1049
+ index$2.LazyLoad,
1050
+ { height: 50 },
1051
+ React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
1052
+ )
1053
+ ),
1054
+ !article.thumbnail && !defaultImage && article.source && React__default.createElement(
1055
+ 'div',
1056
+ { className: 'content-category-label' },
1057
+ React__default.createElement(
1058
+ 'div',
1059
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
1060
+ article.source
1061
+ )
1062
+ ),
1063
+ React__default.createElement(
1064
+ 'div',
1065
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
1066
+ showCategory && article.contentCategory && React__default.createElement(
1067
+ 'p',
1068
+ {
1069
+ className: 'article-category',
1070
+ style: {
1071
+ background: '#3FB618',
1072
+ color: '#ffffff',
1073
+ marginBottom: '.25rem',
1074
+ display: 'inline-block',
1075
+ padding: '0 .25rem',
1076
+ fontSize: '.8rem'
1077
+ } },
1078
+ getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
1079
+ ),
1080
+ article.issueSection && article.issueSection.name && React__default.createElement(
1081
+ 'p',
1082
+ {
1083
+ className: 'issueSection',
1084
+ style: {
1085
+ background: '#000000',
1086
+ color: '#ffffff',
1087
+ marginBottom: '.25rem',
1088
+ marginLeft: '.25rem',
1089
+ display: 'inline-block',
1090
+ padding: '0 .25rem',
1091
+ fontSize: '.8rem'
1092
+ } },
1093
+ article.issueSection.name
1094
+ )
1095
+ ),
1096
+ showPubInfo && (article.issue || article.volume) && React__default.createElement(
1097
+ 'div',
1098
+ { className: 'pubInfo' },
1099
+ article.volume && React__default.createElement(
1100
+ 'p',
1101
+ { className: 'qdeVolume' },
1102
+ article.volume
1103
+ ),
1104
+ article.issue && React__default.createElement(
1105
+ 'p',
1106
+ { className: 'qdeIssue' },
1107
+ article.issue
1108
+ )
1109
+ ),
1110
+ showIntro && article.summary && React__default.createElement(
1111
+ 'p',
1112
+ { className: 'pt-2 card-text' },
1113
+ entities.clean_html_1(article.summary)
1114
+ )
1115
+ )
1116
+ ),
1117
+ React__default.createElement(
1118
+ 'div',
1119
+ null,
1120
+ main.main_36 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
1121
+ )
1122
+ );
1123
+ } else return null;
1124
+ })
1125
+ ) : React__default.createElement(
1126
+ 'div',
1127
+ null,
1128
+ React__default.createElement(
1129
+ 'h5',
1130
+ null,
1131
+ React__default.createElement(
1132
+ 'em',
1133
+ null,
1134
+ 'New content coming soon, please check back later.'
1135
+ )
1136
+ )
1137
+ ),
1138
+ React__default.createElement(
1139
+ 'style',
1140
+ { jsx: 'true' },
1141
+ '\n .displayLabelThumb {\n margin: 0 auto;\n margin-top: -1.25rem;\n background-color: white;\n position: relative;\n }\n .content-category-label {\n margin: 0.5rem 0;\n display: block;\n }\n .sanityDisplayLabel {\n margin: 0.5rem 0;\n border: 1px solid black;\n width: fit-content;\n width: -moz-fit-content;\n padding: 5px;\n color: #484848;\n border-radius: 2px;\n }\n .feature-media > .media-body {\n -webkit-box-flex: none;\n -ms-flex: none;\n flex: none;\n }\n .img-wrapper img {\n max-height: 240px;\n height: auto;\n width: 100%;\n object-fit: contain;\n }\n .feature-wrapper {\n height: 100%;\n width: 100%;\n }\n .feature-wrapper img {\n width: 100%;\n margin-bottom: 1em;\n }\n @media only screen and (min-width: 768px) {\n .img-wrapper > img {\n padding-right: 1em;\n }\n }\n @media only screen and (max-width: 767px) {\n .sanityDisplayLabel {\n max-width: 100%;\n }\n .img-wrapper {\n width: 100%;\n }\n .img-wrapper img {\n padding-bottom: 1em;\n }\n .media {\n flex-direction: column !important;\n }\n }\n '
1142
+ )
1143
+ );
1144
+ };
1145
+
1146
+ var ImagePlaceholder = function ImagePlaceholder() {
1147
+ return React__default.createElement(
1148
+ React__default.Fragment,
1149
+ null,
1150
+ React__default.createElement('div', { className: 'queuedeck-exp-image-placeholder' }),
1151
+ React__default.createElement(
1152
+ 'style',
1153
+ { jsx: 'true' },
1154
+ '\n .queuedeck-exp-image-placeholder {\n width: 240px;\n height: 0;\n padding-top: calc(240px * 9 / 16);\n margin: 0 1rem 0 0;\n }\n @media only screen and (max-width: 767px) {\n .queuedeck-exp-image-placeholder {\n width: 100%;\n height: 0;\n padding-top: calc(100% * 9 / 16);\n margin: 0 0 1rem 0;\n }\n }\n '
1155
+ )
1156
+ );
1157
+ };
1158
+
1159
+ var renderMobileAd = function renderMobileAd(index, numberOfItemsBeforeAd, rightItems) {
1160
+ var i = numberOfItemsBeforeAd < 6 ? 0 : ((index + 1) / numberOfItemsBeforeAd - 1) % rightItems.length;
1161
+ return React__default.createElement(
1162
+ 'div',
1163
+ { style: { display: 'flex', flex: '1 0 auto' } },
1164
+ rightItems[i].component
1165
+ );
1166
+ };
1167
+
1168
+ var usePrevious = function usePrevious(value) {
1169
+ var ref = React.useRef();
1170
+ React.useEffect(function () {
1171
+ ref.current = value;
1172
+ });
1173
+ return ref.current;
1174
+ };
1175
+
1176
+ var QueueDeckExpanded = function QueueDeckExpanded(props) {
1177
+ var router = Router.useRouter();
1178
+ var initialData = props.dataRecord,
1179
+ initialCurrentPage = props.currentPage,
1180
+ client = props.client,
1181
+ params = props.params,
1182
+ query = props.query,
1183
+ pointer = props.pointer,
1184
+ pointerArray = props.pointerArray,
1185
+ mapping = props.mapping,
1186
+ seoPaginate = props.seoPaginate,
1187
+ pageview = props.pageview,
1188
+ defaultImage = props.defaultImage,
1189
+ showAuthor = props.showAuthor,
1190
+ showCategory = props.showCategory,
1191
+ imageHeight = props.imageHeight,
1192
+ imageWidth = props.imageWidth,
1193
+ imageMaxHeight = props.imageMaxHeight,
1194
+ imageFit = props.imageFit,
1195
+ rightItems = props.rightItems,
1196
+ brandInsightAd = props.brandInsightAd,
1197
+ _props$showBI = props.showBI,
1198
+ showBI = _props$showBI === undefined ? false : _props$showBI,
1199
+ _props$heroContent = props.heroContent,
1200
+ heroContent = _props$heroContent === undefined ? 0 : _props$heroContent,
1201
+ _props$lgInfeedAd = props.lgInfeedAd,
1202
+ lgInfeedAd = _props$lgInfeedAd === undefined ? false : _props$lgInfeedAd,
1203
+ _props$showPubInfo = props.showPubInfo,
1204
+ showPubInfo = _props$showPubInfo === undefined ? false : _props$showPubInfo,
1205
+ _props$showTimeDiff = props.showTimeDiff,
1206
+ showTimeDiff = _props$showTimeDiff === undefined ? false : _props$showTimeDiff,
1207
+ _props$showTaxonomies = props.showTaxonomies,
1208
+ showTaxonomies = _props$showTaxonomies === undefined ? false : _props$showTaxonomies,
1209
+ _props$showIntro = props.showIntro,
1210
+ showIntro = _props$showIntro === undefined ? true : _props$showIntro,
1211
+ _props$contentCategor = props.contentCategoryMapping,
1212
+ contentCategoryMapping = _props$contentCategor === undefined ? [] : _props$contentCategor,
1213
+ showPublished = props.showPublished,
1214
+ totalDataCount = props.totalDataCount;
1215
+
1216
+ var _useState3 = React.useState(initialData),
1217
+ _useState4 = slicedToArray._slicedToArray(_useState3, 2),
1218
+ data = _useState4[0],
1219
+ setData = _useState4[1];
1220
+
1221
+ var _useState5 = React.useState(false),
1222
+ _useState6 = slicedToArray._slicedToArray(_useState5, 2),
1223
+ isDataLoading = _useState6[0],
1224
+ setIsDataLoading = _useState6[1];
1225
+
1226
+ var _useState7 = React.useState(initialCurrentPage || 1),
1227
+ _useState8 = slicedToArray._slicedToArray(_useState7, 2),
1228
+ currentPage = _useState8[0],
1229
+ setCurrentPage = _useState8[1];
1230
+
1231
+ var itemsPerPage = params && params.itemsPerPage ? params.itemsPerPage : params && params.from && params.to ? params.to - params.from : 10;
1232
+
1233
+ // Logging GA Pageview on path change
1234
+ var prevPath = usePrevious(lodash.lodash.get(router, 'asPath', undefined));
1235
+ React.useEffect(function () {
1236
+ var currentPath = router.asPath;
1237
+ if (prevPath && prevPath !== currentPath && pageview) {
1238
+ pageview(router.asPath);
1239
+ }
1240
+ }, [router]);
1241
+
1242
+ var seoPagination = function seoPagination(pageNumber) {
1243
+ var path = router.asPath;
1244
+ var qrIndex = path.indexOf('?');
1245
+ var pathname = router.pathname;
1246
+ var queryString = '';
1247
+ if (qrIndex > 0) {
1248
+ path = path.substring(1, qrIndex);
1249
+ var partialQS = router.asPath.substring(qrIndex + 1);
1250
+ var partialQSArr = partialQS.split('&');
1251
+ // exclude page=xxx from query string
1252
+ partialQSArr.map(function (item) {
1253
+ var itemArr = item.split('=');
1254
+ var key = itemArr[0];
1255
+ var val = itemArr[1];
1256
+ if (key !== 'page') queryString += (queryString.length === 0 ? '' : '&') + key + '=' + val;
1257
+ });
1258
+ }
1259
+ if (queryString.length > 0) path += '?' + queryString;
1260
+ pageNumber = parseInt(pageNumber);
1261
+ if (currentPage !== pageNumber) {
1262
+ if (path[0] !== '/') path = '/' + path;
1263
+ var newPath = pageNumber === 1 ? '' + path : '' + path + (queryString.length > 0 ? '&' : '?') + 'page=' + pageNumber;
1264
+ router.push(pathname, newPath, {
1265
+ shallow: true
1266
+ });
1267
+ }
1268
+ };
1269
+
1270
+ var handlePageChange = function () {
1271
+ var _ref2 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(selectedPage) {
1272
+ var start, newParams, newData;
1273
+ return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
1274
+ while (1) {
1275
+ switch (_context.prev = _context.next) {
1276
+ case 0:
1277
+ console.log('selectedPage', selectedPage);
1278
+ setIsDataLoading(true);
1279
+ setCurrentPage(selectedPage);
1280
+ seoPaginate && seoPagination(selectedPage);
1281
+ index.lib_3.refresh();
1282
+ document.body.scrollTop = 0;
1283
+ document.documentElement.scrollTop = 0;
1284
+ start = (selectedPage - 1) * itemsPerPage;
1285
+ newParams = _extends$1._extends({}, params, {
1286
+ from: start,
1287
+ to: start + itemsPerPage
1288
+ });
1289
+ _context.prev = 9;
1290
+ _context.next = 12;
1291
+ return client.fetch(query, newParams);
1292
+
1293
+ case 12:
1294
+ newData = _context.sent;
1295
+
1296
+ if (pointer && pointerArray) newData = newData[pointerArray][pointer];
1297
+ if (newData && newData.length > 0) {
1298
+ setIsDataLoading(false);
1299
+ setData(newData);
1300
+ }
1301
+ _context.next = 20;
1302
+ break;
1303
+
1304
+ case 17:
1305
+ _context.prev = 17;
1306
+ _context.t0 = _context['catch'](9);
1307
+
1308
+ console.error(_context.t0);
1309
+
1310
+ case 20:
1311
+ case 'end':
1312
+ return _context.stop();
1313
+ }
1314
+ }
1315
+ }, _callee, _this, [[9, 17]]);
1316
+ }));
1317
+
1318
+ return function handlePageChange(_x5) {
1319
+ return _ref2.apply(this, arguments);
1320
+ };
1321
+ }();
1322
+
1323
+ return React__default.createElement(
1324
+ 'div',
1325
+ { className: 'queuedeck-expanded' },
1326
+ isDataLoading ? React__default.createElement(
1327
+ 'div',
1328
+ { className: 'd-flex justify-content-center', style: { marginTop: '100px' } },
1329
+ React__default.createElement(
1330
+ reactBootstrap.Spinner,
1331
+ { animation: 'border', role: 'status' },
1332
+ React__default.createElement(
1333
+ 'span',
1334
+ { className: 'sr-only' },
1335
+ 'Loading...'
1336
+ )
1337
+ )
1338
+ ) : React__default.createElement(
1339
+ reactBootstrap.Container,
1340
+ null,
1341
+ React__default.createElement(CardLoader, {
1342
+ data: data,
1343
+ client: client,
1344
+ mapping: mapping,
1345
+ showPublished: showPublished,
1346
+ defaultImage: defaultImage,
1347
+ showAuthor: showAuthor,
1348
+ showCategory: showCategory,
1349
+ imageHeight: imageHeight,
1350
+ imageWidth: imageWidth,
1351
+ imageMaxHeight: imageMaxHeight,
1352
+ imageFit: imageFit,
1353
+ rightItems: rightItems,
1354
+ brandInsightAd: brandInsightAd,
1355
+ showBI: showBI,
1356
+ heroContent: heroContent,
1357
+ lgInfeedAd: lgInfeedAd,
1358
+ showPubInfo: showPubInfo,
1359
+ contentCategoryMapping: contentCategoryMapping,
1360
+ showTimeDif: showTimeDiff,
1361
+ showTaxonomies: showTaxonomies,
1362
+ showIntro: showIntro
1363
+ }),
1364
+ React__default.createElement(
1365
+ 'div',
1366
+ { className: 'pagination-wrapper' },
1367
+ React__default.createElement(Pagination.Pagination, { pageCount: Math.ceil(totalDataCount / itemsPerPage), pageRangeDisplayed: main.main_36 ? 3 : 9, currentPage: currentPage, onPageChange: handlePageChange }),
1368
+ React__default.createElement(
1369
+ 'style',
1370
+ { jsx: 'true' },
1371
+ '\n .pagination-wrapper {\n margin: 3rem 0;\n }\n @media only screen and (max-width: 768px) {\n .pagination-wrapper {\n margin-bottom: 6rem;\n }\n }\n '
1372
+ )
1373
+ )
1374
+ )
1375
+ );
1376
+ };
1377
+
1378
+ module.exports = QueueDeckExpanded;