@mjhls/mjh-framework 1.0.372 → 1.0.374

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