@mjhls/mjh-framework 1.0.385 → 1.0.388

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -37,7 +37,7 @@ var ADInfeed = require('./ADInfeed-f544f2a5.js');
37
37
  var DeckContent = require('./DeckContent.js');
38
38
  var get$1 = require('./get-5aa7468c.js');
39
39
  var GridContent = require('./GridContent-1871749e.js');
40
- require('./AuthorComponent-37deda17.js');
40
+ var AuthorComponent = require('./AuthorComponent-37deda17.js');
41
41
  var DeckQueue = require('./DeckQueue.js');
42
42
  require('react-bootstrap/Media');
43
43
  var ThumbnailCard = require('./ThumbnailCard.js');
@@ -57,7 +57,7 @@ var IssueDeck = require('./IssueDeck.js');
57
57
  require('react-bootstrap/Badge');
58
58
  var IssueContentDeck = require('./IssueContentDeck.js');
59
59
  var Spinner = _interopDefault(require('react-bootstrap/Spinner'));
60
- var TemplateNormal = require('./Normal-a747507b.js');
60
+ var TemplateNormal = require('./Normal-cc68fd44.js');
61
61
  require('react-bootstrap/ListGroup');
62
62
  var Head = _interopDefault(require('next/head'));
63
63
  var Accordion = _interopDefault(require('react-bootstrap/Accordion'));
@@ -2748,11 +2748,6 @@ var EventsDeck = function EventsDeck(_ref) {
2748
2748
  React__default.createElement(
2749
2749
  'div',
2750
2750
  { className: 'speaker-section', style: { border: '1px solid', borderRadius: '8px', padding: '8px' } },
2751
- React__default.createElement(
2752
- 'h6',
2753
- { className: 'speaker-title', style: { fontWeight: '600', marginBottom: '0', marginTop: '.25rem' } },
2754
- 'SPEAKER'
2755
- ),
2756
2751
  speakerInfo.map(function (info, index) {
2757
2752
  return React__default.createElement(
2758
2753
  'p',
@@ -6670,9 +6665,9 @@ var Media = function Media(_ref) {
6670
6665
  'a',
6671
6666
  _extends$2._extends({}, uploadDoc.downloadMedia ? {
6672
6667
  onClick: function onClick() {
6673
- download(uploadDoc.asset.url, uploadDoc.asset.originalFilename);
6668
+ download(uploadDoc.asset.url);
6674
6669
  }
6675
- } : { href: uploadDoc.asset.url, target: '_blank', rel: 'noopener noreferrer' }, {
6670
+ } : { href: uploadDoc.asset.url, target: blank ? '_blank' : '_self', rel: 'noopener noreferrer' }, {
6676
6671
  style: { paddingLeft: '4px', paddingRight: '4px' },
6677
6672
  id: 'media-link' }),
6678
6673
  caption
@@ -16357,48 +16352,6 @@ var GridHero = function GridHero(props) {
16357
16352
  topArticleThumbnail = props.thumbnail;
16358
16353
  }
16359
16354
 
16360
- var renderAuthor = function renderAuthor(authorDetail, index, length) {
16361
- if (authorDetail) {
16362
- var _id = authorDetail._id,
16363
- displayName = authorDetail.displayName,
16364
- url = authorDetail.url;
16365
-
16366
- if (displayName && url && url.current) {
16367
- return React__default.createElement(
16368
- 'div',
16369
- { key: _id },
16370
- index === 0 && React__default.createElement(
16371
- 'span',
16372
- { className: 'pr-1' },
16373
- 'By'
16374
- ),
16375
- React__default.createElement(
16376
- 'a',
16377
- { href: '/authors/' + url.current, className: 'text-muted' },
16378
- displayName,
16379
- length !== index + 1 && React__default.createElement('br', null)
16380
- )
16381
- );
16382
- } else if (displayName) {
16383
- return React__default.createElement(
16384
- 'div',
16385
- { key: _id },
16386
- index === 0 && React__default.createElement(
16387
- 'span',
16388
- { className: 'pr-1' },
16389
- 'By'
16390
- ),
16391
- React__default.createElement(
16392
- 'span',
16393
- { className: 'text-muted' },
16394
- displayName,
16395
- length !== index + 1 && React__default.createElement('br', null)
16396
- )
16397
- );
16398
- }
16399
- } else return null;
16400
- };
16401
-
16402
16355
  return React__default.createElement(
16403
16356
  'div',
16404
16357
  { className: 'article-hero' },
@@ -16431,9 +16384,11 @@ var GridHero = function GridHero(props) {
16431
16384
  { className: 'article-date' },
16432
16385
  moment.moment(topArticle.published).format('MMMM DD, YYYY ')
16433
16386
  ),
16434
- topArticle.authorMapping && topArticle.authorMapping.length > 0 && topArticle.authorMapping.map(function (authorDetail, index) {
16435
- return renderAuthor(authorDetail, index, topArticle.authorMapping.length);
16436
- }),
16387
+ topArticle.authorMapping && topArticle.authorMapping.length > 0 && React__default.createElement(
16388
+ index$1.LazyLoad,
16389
+ { height: 50 },
16390
+ React__default.createElement(AuthorComponent.AuthorComponent, { key: topArticle.url.current, index: topArticle.url.current, authors: topArticle.authorMapping })
16391
+ ),
16437
16392
  topArticle.summary && React__default.createElement(
16438
16393
  'p',
16439
16394
  { className: 'top-article-summary' },
@@ -16457,7 +16412,7 @@ var GridHero = function GridHero(props) {
16457
16412
  return React__default.createElement(
16458
16413
  'div',
16459
16414
  { key: index, className: 'grid-sub-article sub-grid-' + (index + 1) },
16460
- React__default.createElement(
16415
+ articleThumbnail && React__default.createElement(
16461
16416
  'a',
16462
16417
  { href: '/view/' + article.url.current },
16463
16418
  React__default.createElement('img', { src: articleThumbnail, alt: articleAltText })
@@ -16479,9 +16434,11 @@ var GridHero = function GridHero(props) {
16479
16434
  { className: 'article-date' },
16480
16435
  moment.moment(article.published).format('MMMM DD, YYYY ')
16481
16436
  ),
16482
- article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
16483
- return renderAuthor(authorDetail, index, article.authorMapping.length);
16484
- }),
16437
+ article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
16438
+ index$1.LazyLoad,
16439
+ { height: 50 },
16440
+ React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
16441
+ ),
16485
16442
  article.summary && React__default.createElement(
16486
16443
  'p',
16487
16444
  { className: 'sub-article-summary' },
@@ -1,4 +1,6 @@
1
1
  import './_commonjsHelpers-0c4b6f40.js';
2
+ import './_to-object-1b1f7766.js';
3
+ import './web.dom.iterable-e6bf2bf6.js';
2
4
  import React__default from 'react';
3
5
  import 'prop-types';
4
6
  import Row from 'react-bootstrap/Row';
@@ -8,6 +10,8 @@ import { m as moment } from './moment-12415288.js';
8
10
  import 'react-dom';
9
11
  import { i as imageUrlBuilder } from './index-51a80699.js';
10
12
  import { L as LazyLoad } from './index-5f9f807a.js';
13
+ import './slicedToArray-04e02710.js';
14
+ import { A as AuthorComponent } from './AuthorComponent-beb2ad16.js';
11
15
  import Badge from 'react-bootstrap/Badge';
12
16
 
13
17
  var urlFor = function urlFor(source, client) {
@@ -53,12 +57,12 @@ var PublicationDeckStack = function PublicationDeckStack(props) {
53
57
  Card,
54
58
  { style: { boxShadow: 'none', borderBottom: '1px solid #aaa', paddingBottom: '1rem' } },
55
59
  React__default.createElement(
56
- 'a',
57
- { href: '/view/' + link },
58
- React__default.createElement(
59
- 'div',
60
- { style: { display: 'flex', flex: '1 0 auto' } },
61
- coverImage && React__default.createElement(
60
+ 'div',
61
+ { style: { display: 'flex', flex: '1 0 auto' } },
62
+ coverImage && React__default.createElement(
63
+ 'a',
64
+ { href: '/view/' + link },
65
+ React__default.createElement(
62
66
  LazyLoad,
63
67
  { height: imageHeight },
64
68
  React__default.createElement(Card.Img, {
@@ -67,47 +71,50 @@ var PublicationDeckStack = function PublicationDeckStack(props) {
67
71
  alt: title,
68
72
  style: { width: '170px', height: 'auto', objectFit: 'contain', padding: '0.25rem', float: 'left', paddingBottom: '1rem' }
69
73
  })
70
- ),
74
+ )
75
+ ),
76
+ React__default.createElement(
77
+ Card.Body,
78
+ { style: { padding: '0.5rem' } },
79
+ section ? React__default.createElement(
80
+ Badge,
81
+ { variant: 'success' },
82
+ section.name
83
+ ) : '',
71
84
  React__default.createElement(
72
- Card.Body,
73
- { style: { padding: '0.5rem' } },
74
- section ? React__default.createElement(
75
- Badge,
76
- { variant: 'success' },
77
- section.name
78
- ) : '',
85
+ Card.Title,
86
+ { style: { color: '#121212', fontSize: '1.1rem' } },
79
87
  React__default.createElement(
80
- Card.Title,
81
- { style: { color: '#121212', fontSize: '1.1rem' } },
88
+ 'a',
89
+ { href: '/view/' + link },
82
90
  React__default.createElement(
83
91
  'span',
84
92
  null,
85
93
  title
86
- ),
87
- React__default.createElement('br', null)
94
+ )
88
95
  ),
96
+ React__default.createElement('br', null)
97
+ ),
98
+ React__default.createElement(
99
+ 'div',
100
+ { style: { float: 'left' } },
89
101
  React__default.createElement(
90
- 'div',
91
- { style: { float: 'left' } },
92
- React__default.createElement(
93
- 'p',
94
- { style: { color: '#484848', fontSize: '.9rem', fontWeight: '600' }, className: 'mb-0' },
95
- moment(published).format('MMMM DD, YYYY ')
96
- ),
97
- author.length > 0 && React__default.createElement(
98
- 'p',
99
- { style: { color: '#484848', fontSize: '.9rem', fontWeight: '600' }, className: 'mb-0' },
100
- 'By ',
101
- author
102
- )
102
+ 'p',
103
+ { style: { color: '#484848', fontSize: '.9rem', fontWeight: '600' }, className: 'mb-0' },
104
+ moment(published).format('MMMM DD, YYYY ')
105
+ ),
106
+ author.length > 0 && React__default.createElement(
107
+ LazyLoad,
108
+ { height: 50 },
109
+ React__default.createElement(AuthorComponent, { key: index.toString(), index: index, authors: author })
103
110
  )
104
111
  )
105
- ),
106
- React__default.createElement(
107
- 'p',
108
- { style: { paddingLeft: '0.5rem' } },
109
- summary
110
112
  )
113
+ ),
114
+ React__default.createElement(
115
+ 'p',
116
+ { style: { paddingLeft: '0.5rem' } },
117
+ summary
111
118
  )
112
119
  )
113
120
  );
@@ -182,7 +189,7 @@ var IssueContentDeck = function IssueContentDeck(props) {
182
189
  imageWidth: imageWidth,
183
190
  client: client,
184
191
  published: row.published,
185
- author: row.authorMapping && row.authorMapping.displayName ? row.authorMapping.displayName : '',
192
+ author: row.authorMapping && row.authorMapping.length > 0 ? row.authorMapping : [],
186
193
  summary: row.summary
187
194
  });
188
195
  }