@mjhls/mjh-framework 1.0.373 → 1.0.375

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.
@@ -16,9 +16,9 @@ import { i as imageUrlBuilder } from './index-51a80699.js';
16
16
  import { L as LazyLoad } from './index-5f9f807a.js';
17
17
  import { c as clean_html_1 } from './entities-7cc3bf45.js';
18
18
  import { _ as _slicedToArray } from './slicedToArray-a47a84a4.js';
19
- import './AdSlot-8946358f.js';
19
+ import './AdSlot-1cc6bdb0.js';
20
20
  import './promise-86cb8313.js';
21
- import { A as ADInfeed } from './ADInfeed-ca26fca6.js';
21
+ import { A as ADInfeed } from './ADInfeed-c65835b9.js';
22
22
  import { Container, Media } from 'react-bootstrap';
23
23
 
24
24
  var urlFor = function urlFor(source, builder) {
@@ -131,7 +131,7 @@ var renderAuthor = function renderAuthor(authorDetail, index, length) {
131
131
 
132
132
  if (displayName && url && url.current) {
133
133
  return React__default.createElement(
134
- 'div',
134
+ 'span',
135
135
  { key: _id },
136
136
  index === 0 && React__default.createElement(
137
137
  'span',
@@ -142,12 +142,16 @@ var renderAuthor = function renderAuthor(authorDetail, index, length) {
142
142
  'a',
143
143
  { href: '/authors/' + url.current, className: 'text-muted' },
144
144
  displayName,
145
- length !== index + 1 && React__default.createElement('br', null)
145
+ length !== index + 1 && React__default.createElement(
146
+ 'span',
147
+ { style: { paddingLeft: 7, paddingRight: 7 } },
148
+ '|'
149
+ )
146
150
  )
147
151
  );
148
152
  } else if (displayName) {
149
153
  return React__default.createElement(
150
- 'div',
154
+ 'span',
151
155
  { key: _id },
152
156
  index === 0 && React__default.createElement(
153
157
  'span',
@@ -158,7 +162,11 @@ var renderAuthor = function renderAuthor(authorDetail, index, length) {
158
162
  'span',
159
163
  { className: 'text-muted' },
160
164
  displayName,
161
- length !== index + 1 && React__default.createElement('br', null)
165
+ length !== index + 1 && React__default.createElement(
166
+ 'span',
167
+ { style: { paddingLeft: 7, paddingRight: 7 } },
168
+ '|'
169
+ )
162
170
  )
163
171
  );
164
172
  }
@@ -207,243 +215,228 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
207
215
  if (article._type === 'feature') {
208
216
  if (article.blank || checkExternalUrl(article.url.current)) {
209
217
  return React__default.createElement(
210
- React__default.Fragment,
211
- { key: article._id ? article._id : index },
218
+ VisibilitySensor,
219
+ {
220
+ key: article._id ? article._id : index,
221
+ partialVisibility: true,
222
+ onChange: function onChange(isVisible) {
223
+ isVisible && changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage);
224
+ } },
212
225
  React__default.createElement(
213
- VisibilitySensor,
214
- {
215
- key: article._id ? article._id : index,
216
- partialVisibility: true,
217
- onChange: function onChange(isVisible) {
218
- isVisible && changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage);
219
- } },
226
+ React__default.Fragment,
227
+ null,
220
228
  React__default.createElement(
221
- React__default.Fragment,
222
- null,
229
+ Media,
230
+ {
231
+ key: article._id ? article._id : index,
232
+ className: 'feature-media',
233
+ style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
234
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
235
+ 'a',
236
+ { href: article.url.current, target: '_blank', className: 'feature-wrapper' },
237
+ React__default.createElement(
238
+ LazyLoad,
239
+ { height: imageHeight },
240
+ article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, builder, imageHeight, imageWidth), 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 })
241
+ )
242
+ ),
223
243
  React__default.createElement(
224
- Media,
225
- {
226
- key: article._id ? article._id : index,
227
- className: 'feature-media',
228
- style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
229
- (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
244
+ Media.Body,
245
+ null,
246
+ React__default.createElement(
230
247
  'a',
231
- { href: article.url.current, target: '_blank', className: 'feature-wrapper' },
232
- React__default.createElement(
233
- LazyLoad,
234
- { height: imageHeight },
235
- article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, builder, imageHeight, imageWidth), 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 })
248
+ { href: article.url.current, target: '_blank' },
249
+ article.title && React__default.createElement(
250
+ 'h4',
251
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
252
+ article.title
236
253
  )
237
254
  ),
238
- React__default.createElement(
239
- Media.Body,
240
- null,
241
- React__default.createElement(
242
- 'a',
243
- { href: article.url.current, target: '_blank' },
244
- article.title && React__default.createElement(
245
- 'h4',
246
- { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
247
- article.title
248
- )
249
- ),
250
- showPublished && article.published && React__default.createElement(
251
- 'p',
252
- { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
253
- moment(article.published).format('MMMM DD, YYYY')
254
- ),
255
- showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
256
- return renderAuthor(authorDetail, index, article.authorMapping.length);
257
- }),
258
- article.source && React__default.createElement(
259
- 'p',
260
- { className: 'p-0 mb-1' },
261
- article.source
262
- ),
263
- showCategory && article.contentCategory && React__default.createElement(
264
- 'p',
265
- {
266
- className: 'article-category',
267
- style: {
268
- background: '#3FB618',
269
- color: '#ffffff',
270
- marginBottom: '.25rem',
271
- display: 'inline-block',
272
- padding: '0 .25rem',
273
- fontSize: '.8rem'
274
- } },
275
- article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
276
- ),
277
- article.summary && React__default.createElement(
278
- 'p',
279
- { className: 'pt-2 card-text' },
280
- clean_html_1(article.summary)
281
- )
255
+ showPublished && article.published && React__default.createElement(
256
+ 'p',
257
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
258
+ moment(article.published).format('MMMM DD, YYYY')
259
+ ),
260
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
261
+ return renderAuthor(authorDetail, index, article.authorMapping.length);
262
+ }),
263
+ article.source && React__default.createElement(
264
+ 'p',
265
+ { className: 'p-0 mb-1' },
266
+ article.source
267
+ ),
268
+ showCategory && article.contentCategory && React__default.createElement(
269
+ 'p',
270
+ {
271
+ className: 'article-category',
272
+ style: {
273
+ background: '#3FB618',
274
+ color: '#ffffff',
275
+ marginBottom: '.25rem',
276
+ display: 'inline-block',
277
+ padding: '0 .25rem',
278
+ fontSize: '.8rem'
279
+ } },
280
+ article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
281
+ ),
282
+ article.summary && React__default.createElement(
283
+ 'p',
284
+ { className: 'pt-2 card-text' },
285
+ clean_html_1(article.summary)
282
286
  )
283
287
  )
284
288
  )
285
- ),
286
- main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
289
+ )
287
290
  );
288
291
  } else {
289
292
  return React__default.createElement(
290
- React__default.Fragment,
291
- { key: article._id ? article._id : index },
293
+ VisibilitySensor,
294
+ {
295
+ key: article._id ? article._id : index,
296
+ partialVisibility: true,
297
+ onChange: function onChange(isVisible) {
298
+ isVisible && changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage);
299
+ } },
292
300
  React__default.createElement(
293
- VisibilitySensor,
294
- {
295
- key: article._id ? article._id : index,
296
- partialVisibility: true,
297
- onChange: function onChange(isVisible) {
298
- isVisible && changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage);
299
- } },
301
+ React__default.Fragment,
302
+ null,
300
303
  React__default.createElement(
301
- React__default.Fragment,
302
- null,
304
+ Media,
305
+ {
306
+ key: article._id ? article._id : index,
307
+ className: 'feature-media',
308
+ style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
309
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
310
+ 'a',
311
+ { href: article.url.current, className: 'feature-wrapper' },
312
+ React__default.createElement(
313
+ LazyLoad,
314
+ { height: imageHeight },
315
+ article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, builder, imageHeight, imageWidth), 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 })
316
+ )
317
+ ),
303
318
  React__default.createElement(
304
- Media,
305
- {
306
- key: article._id ? article._id : index,
307
- className: 'feature-media',
308
- style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
309
- (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
319
+ Media.Body,
320
+ null,
321
+ React__default.createElement(
310
322
  'a',
311
- { href: article.url.current, className: 'feature-wrapper' },
312
- React__default.createElement(
313
- LazyLoad,
314
- { height: imageHeight },
315
- article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, builder, imageHeight, imageWidth), 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 })
323
+ { href: article.url.current },
324
+ article.title && React__default.createElement(
325
+ 'h4',
326
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
327
+ article.title
316
328
  )
317
329
  ),
318
- React__default.createElement(
319
- Media.Body,
320
- null,
321
- React__default.createElement(
322
- 'a',
323
- { href: article.url.current },
324
- article.title && React__default.createElement(
325
- 'h4',
326
- { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
327
- article.title
328
- )
329
- ),
330
- showPublished && article.published && React__default.createElement(
331
- 'p',
332
- { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
333
- moment(article.published).format('MMMM DD, YYYY')
334
- ),
335
- showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
336
- return renderAuthor(authorDetail, index, article.authorMapping.length);
337
- }),
338
- article.source && React__default.createElement(
339
- 'p',
340
- { className: 'p-0 mb-1' },
341
- article.source
342
- ),
343
- showCategory && article.contentCategory && React__default.createElement(
344
- 'p',
345
- {
346
- style: {
347
- background: '#3FB618',
348
- color: '#ffffff',
349
- marginBottom: '.25rem',
350
- display: 'inline-block',
351
- padding: '0 .25rem',
352
- fontSize: '.8rem'
353
- } },
354
- article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
355
- ),
356
- article.summary && React__default.createElement(
357
- 'p',
358
- { className: 'pt-2 card-text' },
359
- clean_html_1(article.summary)
360
- )
330
+ showPublished && article.published && React__default.createElement(
331
+ 'p',
332
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
333
+ moment(article.published).format('MMMM DD, YYYY')
334
+ ),
335
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
336
+ return renderAuthor(authorDetail, index, article.authorMapping.length);
337
+ }),
338
+ article.source && React__default.createElement(
339
+ 'p',
340
+ { className: 'p-0 mb-1' },
341
+ article.source
342
+ ),
343
+ showCategory && article.contentCategory && React__default.createElement(
344
+ 'p',
345
+ {
346
+ style: {
347
+ background: '#3FB618',
348
+ color: '#ffffff',
349
+ marginBottom: '.25rem',
350
+ display: 'inline-block',
351
+ padding: '0 .25rem',
352
+ fontSize: '.8rem'
353
+ } },
354
+ article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
355
+ ),
356
+ article.summary && React__default.createElement(
357
+ 'p',
358
+ { className: 'pt-2 card-text' },
359
+ clean_html_1(article.summary)
361
360
  )
362
361
  )
363
362
  )
364
- ),
365
- main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
363
+ )
366
364
  );
367
365
  }
368
366
  } else if (article._type === 'brandInsightAd' && article.adUnit) {
369
367
  return React__default.createElement(ADInfeed, { index: index, infeedAd: article });
370
368
  }
371
-
369
+ if (main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0) {
370
+ return renderMobileAd(index, numberOfItemsBeforeAd, rightItems);
371
+ }
372
372
  return React__default.createElement(
373
- React__default.Fragment,
374
- { key: article._id ? article._id : index },
373
+ VisibilitySensor,
374
+ {
375
+ key: article._id ? article._id : index,
376
+ onChange: function onChange(isVisible) {
377
+ isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
378
+ } },
375
379
  React__default.createElement(
376
- VisibilitySensor,
377
- {
378
- key: article._id ? article._id : index,
379
- onChange: function onChange(isVisible) {
380
- isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
381
- } },
380
+ React__default.Fragment,
381
+ null,
382
382
  React__default.createElement(
383
- React__default.Fragment,
384
- null,
383
+ Media,
384
+ { key: article._id ? article._id : index, style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
385
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
386
+ 'a',
387
+ { href: mapping[contentCategoryName] + '/' + article.url.current, className: 'img-wrapper' },
388
+ React__default.createElement(
389
+ LazyLoad,
390
+ { height: imageHeight },
391
+ article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'mr-3 img-fluid', src: renderCardImage(article, builder, imageHeight, imageWidth), 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 })
392
+ )
393
+ ),
385
394
  React__default.createElement(
386
- Media,
387
- {
388
- key: article._id ? article._id : index,
389
- style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
390
- (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
395
+ Media.Body,
396
+ null,
397
+ React__default.createElement(
391
398
  'a',
392
- { href: mapping[contentCategoryName] + '/' + article.url.current, className: 'img-wrapper' },
393
- React__default.createElement(
394
- LazyLoad,
395
- { height: imageHeight },
396
- article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'mr-3 img-fluid', src: renderCardImage(article, builder, imageHeight, imageWidth), 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 })
399
+ { href: mapping[contentCategoryName] + '/' + article.url.current },
400
+ article.title && React__default.createElement(
401
+ 'h4',
402
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
403
+ article.title
397
404
  )
398
405
  ),
399
- React__default.createElement(
400
- Media.Body,
401
- null,
402
- React__default.createElement(
403
- 'a',
404
- { href: mapping[contentCategoryName] + '/' + article.url.current },
405
- article.title && React__default.createElement(
406
- 'h4',
407
- { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
408
- article.title
409
- )
410
- ),
411
- showPublished && article.published && React__default.createElement(
412
- 'p',
413
- { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
414
- moment(article.published).format('MMMM DD, YYYY')
415
- ),
416
- showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
417
- return renderAuthor(authorDetail, index, article.authorMapping.length);
418
- }),
419
- article.source && React__default.createElement(
420
- 'p',
421
- { className: 'p-0 mb-1' },
422
- article.source
423
- ),
424
- showCategory && article.contentCategory && React__default.createElement(
425
- 'p',
426
- {
427
- style: {
428
- background: '#3FB618',
429
- color: '#ffffff',
430
- marginBottom: '.25rem',
431
- display: 'inline-block',
432
- padding: '0 .25rem',
433
- fontSize: '.8rem'
434
- } },
435
- article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
436
- ),
437
- article.summary && React__default.createElement(
438
- 'p',
439
- { className: 'pt-2 card-text' },
440
- clean_html_1(article.summary)
441
- )
406
+ showPublished && article.published && React__default.createElement(
407
+ 'p',
408
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
409
+ moment(article.published).format('MMMM DD, YYYY')
410
+ ),
411
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
412
+ return renderAuthor(authorDetail, index, article.authorMapping.length);
413
+ }),
414
+ article.source && React__default.createElement(
415
+ 'p',
416
+ { className: 'p-0 mb-1' },
417
+ article.source
418
+ ),
419
+ showCategory && article.contentCategory && React__default.createElement(
420
+ 'p',
421
+ {
422
+ style: {
423
+ background: '#3FB618',
424
+ color: '#ffffff',
425
+ marginBottom: '.25rem',
426
+ display: 'inline-block',
427
+ padding: '0 .25rem',
428
+ fontSize: '.8rem'
429
+ } },
430
+ article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
431
+ ),
432
+ article.summary && React__default.createElement(
433
+ 'p',
434
+ { className: 'pt-2 card-text' },
435
+ clean_html_1(article.summary)
442
436
  )
443
437
  )
444
438
  )
445
- ),
446
- main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
439
+ )
447
440
  );
448
441
  }) : React__default.createElement(
449
442
  'div',
@@ -9,14 +9,14 @@ import 'react-bootstrap/Container';
9
9
  import 'react-bootstrap/Row';
10
10
  import 'react-bootstrap/Col';
11
11
  import './slicedToArray-a47a84a4.js';
12
- import './AdSlot-8946358f.js';
12
+ import './AdSlot-1cc6bdb0.js';
13
13
  import './promise-86cb8313.js';
14
14
  import './get-36d03764.js';
15
15
  import './react-social-icons-a7d5c5c7.js';
16
16
  import 'react-bootstrap';
17
17
  import './index.esm-536609db.js';
18
18
  import 'react-bootstrap/Button';
19
- export { T as default } from './Normal-13c85a50.js';
19
+ export { T as default } from './Normal-308179a5.js';
20
20
  import 'react-bootstrap/ListGroup';
21
21
  import 'next/head';
22
22
  import 'react-bootstrap/Nav';