@mjhls/mjh-framework 1.0.91 → 1.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.es.js +111 -54
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +110 -53
- package/dist/index.js.map +1 -1
- package/package.json +5 -7
package/dist/index.js
CHANGED
|
@@ -12,11 +12,11 @@ var Container = _interopDefault(require('react-bootstrap/Container'));
|
|
|
12
12
|
var Row = _interopDefault(require('react-bootstrap/Row'));
|
|
13
13
|
var Col = _interopDefault(require('react-bootstrap/Col'));
|
|
14
14
|
var Card = _interopDefault(require('react-bootstrap/Card'));
|
|
15
|
+
var moment = _interopDefault(require('moment'));
|
|
15
16
|
var Link = _interopDefault(require('next/link'));
|
|
16
17
|
var router = require('next/router');
|
|
17
18
|
var Media = _interopDefault(require('react-bootstrap/Media'));
|
|
18
19
|
var reactBootstrap = require('react-bootstrap');
|
|
19
|
-
var moment = _interopDefault(require('moment'));
|
|
20
20
|
var ListGroup = _interopDefault(require('react-bootstrap/ListGroup'));
|
|
21
21
|
var Head = _interopDefault(require('next/head'));
|
|
22
22
|
var Accordion = _interopDefault(require('react-bootstrap/Accordion'));
|
|
@@ -4017,6 +4017,11 @@ var DeckContent = function (_React$Component) {
|
|
|
4017
4017
|
null,
|
|
4018
4018
|
row.title
|
|
4019
4019
|
),
|
|
4020
|
+
_this.props.showPublished && row.published && React__default.createElement(
|
|
4021
|
+
Card.Subtitle,
|
|
4022
|
+
null,
|
|
4023
|
+
moment(row.published).format('MMMM DD, YYYY')
|
|
4024
|
+
),
|
|
4020
4025
|
React__default.createElement(
|
|
4021
4026
|
Card.Text,
|
|
4022
4027
|
null,
|
|
@@ -5149,7 +5154,7 @@ var GridContent = function (_React$Component) {
|
|
|
5149
5154
|
args[_key] = arguments[_key];
|
|
5150
5155
|
}
|
|
5151
5156
|
|
|
5152
|
-
return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = GridContent.__proto__ || Object.getPrototypeOf(GridContent)).call.apply(_ref, [this].concat(args))), _this), _this.page = _this.props.page, _this.mapping = _this.props.mapping, _this.data = _this.props.dataRecord, _this.query = _this.props.query, _this.params = _this.props.params, _this.pointer = _this.props.pointer ? _this.props.pointer : false, _this.pointerArray = _this.props.pointerArray ? _this.props.pointerArray : false, _this.state = {
|
|
5157
|
+
return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = GridContent.__proto__ || Object.getPrototypeOf(GridContent)).call.apply(_ref, [this].concat(args))), _this), _this.page = _this.props.page, _this.mapping = _this.props.mapping, _this.data = _this.props.dataRecord, _this.query = _this.props.query, _this.params = _this.props.params, _this.pointer = _this.props.pointer ? _this.props.pointer : false, _this.pointerArray = _this.props.pointerArray ? _this.props.pointerArray : false, _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.state = {
|
|
5153
5158
|
data: _this.data,
|
|
5154
5159
|
per: _this.params ? _this.params.to : 2,
|
|
5155
5160
|
page: 1,
|
|
@@ -5261,7 +5266,7 @@ var GridContent = function (_React$Component) {
|
|
|
5261
5266
|
pageNumber = parseInt(pageNumber);
|
|
5262
5267
|
|
|
5263
5268
|
if (currentPage !== pageNumber) {
|
|
5264
|
-
|
|
5269
|
+
lib_3.refresh();
|
|
5265
5270
|
if (pageview) {
|
|
5266
5271
|
_this.setState({
|
|
5267
5272
|
currentPage: pageNumber
|
|
@@ -5295,12 +5300,12 @@ var GridContent = function (_React$Component) {
|
|
|
5295
5300
|
return React__default.createElement(
|
|
5296
5301
|
Row,
|
|
5297
5302
|
null,
|
|
5298
|
-
this.state.data && this.state.data.map(function (row, index) {
|
|
5303
|
+
this.state.data && this.state.data.map(function (row, index$$1) {
|
|
5299
5304
|
// const thumbnailURL = get(row, 'thumbnail.asset.url', this.props.defaultImage)
|
|
5300
5305
|
var thumbnailURL = row.thumbnail ? _this2.urlFor(row.thumbnail).url() : _this2.props.defaultImage;
|
|
5301
5306
|
return React__default.createElement(
|
|
5302
5307
|
Col,
|
|
5303
|
-
{ key: index, md: 12, lg: lgVar, style: { display: 'flex', flex: '1 0 auto' } },
|
|
5308
|
+
{ key: index$$1, md: 12, lg: lgVar, style: { display: 'flex', flex: '1 0 auto' } },
|
|
5304
5309
|
React__default.createElement(
|
|
5305
5310
|
Link,
|
|
5306
5311
|
{ href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
|
|
@@ -5329,6 +5334,11 @@ var GridContent = function (_React$Component) {
|
|
|
5329
5334
|
null,
|
|
5330
5335
|
row.title
|
|
5331
5336
|
),
|
|
5337
|
+
_this2.props.showPublished && row.published && React__default.createElement(
|
|
5338
|
+
Card.Subtitle,
|
|
5339
|
+
null,
|
|
5340
|
+
moment(row.published).format('MMMM DD, YYYY')
|
|
5341
|
+
),
|
|
5332
5342
|
React__default.createElement(
|
|
5333
5343
|
Card.Text,
|
|
5334
5344
|
null,
|
|
@@ -5347,7 +5357,7 @@ var GridContent = function (_React$Component) {
|
|
|
5347
5357
|
return React__default.createElement(
|
|
5348
5358
|
'div',
|
|
5349
5359
|
{ className: 'grid-container' },
|
|
5350
|
-
this.state.data && this.state.data.map(function (row, index) {
|
|
5360
|
+
this.state.data && this.state.data.map(function (row, index$$1) {
|
|
5351
5361
|
var pageNumber = row.pageNumber || _this2.state.page;
|
|
5352
5362
|
var contentCategoryName = row.contentCategory ? row.contentCategory.name : 'Articles';
|
|
5353
5363
|
return React__default.createElement(
|
|
@@ -5362,13 +5372,13 @@ var GridContent = function (_React$Component) {
|
|
|
5362
5372
|
{ counter: itemCounter++, style: { display: 'flex', flex: '1 0 auto' } },
|
|
5363
5373
|
React__default.createElement(
|
|
5364
5374
|
Card,
|
|
5365
|
-
{ className: 'content-card', style: { flexDirection: index === 0 || index % 4 === 0 ? 'top' : 'row' } },
|
|
5375
|
+
{ className: 'content-card', style: { flexDirection: index$$1 === 0 || index$$1 % 4 === 0 ? 'top' : 'row' } },
|
|
5366
5376
|
React__default.createElement(
|
|
5367
5377
|
Link,
|
|
5368
5378
|
{ href: _this2.mapping[contentCategoryName] + '/[url]', as: _this2.mapping[contentCategoryName] + '/' + row.url.current },
|
|
5369
5379
|
React__default.createElement(
|
|
5370
5380
|
'a',
|
|
5371
|
-
{ className: index === 0 || index % 4 === 0 ? '' : 'card-image' },
|
|
5381
|
+
{ className: index$$1 === 0 || index$$1 % 4 === 0 ? '' : 'card-image' },
|
|
5372
5382
|
React__default.createElement(Card.Img, { variant: 'top', src: _this2.renderCardImage(row, page), alt: row.thumbnail && row.thumbnail.asset ? row.thumbnail.asset.originalFilename : '' })
|
|
5373
5383
|
)
|
|
5374
5384
|
),
|
|
@@ -5388,7 +5398,7 @@ var GridContent = function (_React$Component) {
|
|
|
5388
5398
|
),
|
|
5389
5399
|
React__default.createElement(
|
|
5390
5400
|
Card.Text,
|
|
5391
|
-
{ className: index === 0 || index % 4 === 0 ? '' : 'card-subtext' },
|
|
5401
|
+
{ className: index$$1 === 0 || index$$1 % 4 === 0 ? '' : 'card-subtext' },
|
|
5392
5402
|
row.summary
|
|
5393
5403
|
)
|
|
5394
5404
|
)
|
|
@@ -5459,6 +5469,8 @@ var GridContent = function (_React$Component) {
|
|
|
5459
5469
|
return GridContent;
|
|
5460
5470
|
}(React__default.Component);
|
|
5461
5471
|
|
|
5472
|
+
var GridContent$1 = router.withRouter(GridContent);
|
|
5473
|
+
|
|
5462
5474
|
var DeckQueue = function (_React$Component) {
|
|
5463
5475
|
inherits(DeckQueue, _React$Component);
|
|
5464
5476
|
|
|
@@ -5562,38 +5574,57 @@ var DeckQueue = function (_React$Component) {
|
|
|
5562
5574
|
Col,
|
|
5563
5575
|
{ key: index, md: 12, lg: lgVar, style: { display: 'flex', flex: '1 0 auto' } },
|
|
5564
5576
|
React__default.createElement(
|
|
5565
|
-
|
|
5566
|
-
{
|
|
5577
|
+
Card,
|
|
5578
|
+
{ className: 'queue-card', style: { borderTop: '1px solid #EEE' } },
|
|
5567
5579
|
React__default.createElement(
|
|
5568
|
-
|
|
5569
|
-
|
|
5580
|
+
Row,
|
|
5581
|
+
{ style: { flexDirection: mode } },
|
|
5570
5582
|
React__default.createElement(
|
|
5571
|
-
|
|
5572
|
-
{
|
|
5583
|
+
Col,
|
|
5584
|
+
{ md: 12, lg: 4 },
|
|
5573
5585
|
React__default.createElement(
|
|
5574
|
-
|
|
5575
|
-
{
|
|
5576
|
-
React__default.createElement(
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5586
|
+
Link,
|
|
5587
|
+
{ href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
|
|
5588
|
+
React__default.createElement(Card.Img, { variant: 'top', src: thumbnailURL })
|
|
5589
|
+
)
|
|
5590
|
+
),
|
|
5591
|
+
React__default.createElement(
|
|
5592
|
+
Col,
|
|
5593
|
+
null,
|
|
5594
|
+
React__default.createElement(
|
|
5595
|
+
Card.Body,
|
|
5596
|
+
{ style: { padding: '20px' } },
|
|
5597
|
+
row.title && React__default.createElement(
|
|
5598
|
+
Link,
|
|
5599
|
+
{ href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
|
|
5600
|
+
React__default.createElement(
|
|
5601
|
+
Card.Title,
|
|
5602
|
+
null,
|
|
5603
|
+
row.title
|
|
5604
|
+
)
|
|
5580
5605
|
),
|
|
5581
|
-
React__default.createElement(
|
|
5582
|
-
|
|
5606
|
+
_this2.props.showPublished && row.published && React__default.createElement(
|
|
5607
|
+
Card.Subtitle,
|
|
5583
5608
|
null,
|
|
5609
|
+
moment(row.published).format('MMMM DD, YYYY')
|
|
5610
|
+
),
|
|
5611
|
+
_this2.props.showRecent && row.recent && row.recent.title && React__default.createElement(
|
|
5612
|
+
Card.Subtitle,
|
|
5613
|
+
null,
|
|
5614
|
+
'Recent : ',
|
|
5584
5615
|
React__default.createElement(
|
|
5585
|
-
|
|
5586
|
-
{
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5616
|
+
Link,
|
|
5617
|
+
{ href: 'view/' + row.recent.url.current },
|
|
5618
|
+
row.recent.title
|
|
5619
|
+
)
|
|
5620
|
+
),
|
|
5621
|
+
row.summary && React__default.createElement(
|
|
5622
|
+
Link,
|
|
5623
|
+
{ href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
|
|
5624
|
+
React__default.createElement(
|
|
5625
|
+
Card.Text,
|
|
5626
|
+
null,
|
|
5627
|
+
row.summary
|
|
5597
5628
|
)
|
|
5598
5629
|
)
|
|
5599
5630
|
)
|
|
@@ -6166,8 +6197,6 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
6166
6197
|
);
|
|
6167
6198
|
};
|
|
6168
6199
|
|
|
6169
|
-
var _this = undefined;
|
|
6170
|
-
|
|
6171
6200
|
var urlFor = function urlFor(builder, source) {
|
|
6172
6201
|
return builder.image(source);
|
|
6173
6202
|
};
|
|
@@ -6188,8 +6217,7 @@ var loadData = function loadData(values, query, client, params, setData, setScro
|
|
|
6188
6217
|
|
|
6189
6218
|
client.fetch(query, params).then(function (dataArr) {
|
|
6190
6219
|
if (pointer && pointerArray) {
|
|
6191
|
-
|
|
6192
|
-
dataArr = dataArr[pointerArray][_pointer];
|
|
6220
|
+
dataArr = dataArr[pointerArray][pointer];
|
|
6193
6221
|
}
|
|
6194
6222
|
dataArr = dataArr.map(function (item) {
|
|
6195
6223
|
return _extends({}, item, {
|
|
@@ -6248,7 +6276,6 @@ var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pagevi
|
|
|
6248
6276
|
}
|
|
6249
6277
|
var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
|
|
6250
6278
|
pageview(newPath);
|
|
6251
|
-
|
|
6252
6279
|
router$$1.push(pathname, newPath, {
|
|
6253
6280
|
shallow: true
|
|
6254
6281
|
});
|
|
@@ -6279,8 +6306,7 @@ var renderAuthor = function renderAuthor(authorName, authorURL, index$$1, length
|
|
|
6279
6306
|
}
|
|
6280
6307
|
};
|
|
6281
6308
|
|
|
6282
|
-
var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage) {
|
|
6283
|
-
|
|
6309
|
+
var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage) {
|
|
6284
6310
|
return React__default.createElement(
|
|
6285
6311
|
'div',
|
|
6286
6312
|
null,
|
|
@@ -6306,7 +6332,11 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
6306
6332
|
React__default.createElement(
|
|
6307
6333
|
'a',
|
|
6308
6334
|
null,
|
|
6309
|
-
|
|
6335
|
+
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', {
|
|
6336
|
+
className: 'mr-3',
|
|
6337
|
+
src: urlFor(builder, article.thumbnail).width(200).height(130).url(),
|
|
6338
|
+
alt: article.title
|
|
6339
|
+
}) : React__default.createElement('img', { src: defaultImage, className: 'mr-3', width: '200', height: '130' })
|
|
6310
6340
|
)
|
|
6311
6341
|
),
|
|
6312
6342
|
React__default.createElement(
|
|
@@ -6325,8 +6355,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
6325
6355
|
)
|
|
6326
6356
|
)
|
|
6327
6357
|
),
|
|
6328
|
-
article.published && React__default.createElement(
|
|
6329
|
-
'
|
|
6358
|
+
showPublished && article.published && React__default.createElement(
|
|
6359
|
+
'h6',
|
|
6330
6360
|
{ className: 'card-text', style: { color: 'var(--gray)', marginBottom: '.25rem' } },
|
|
6331
6361
|
moment(article.published).format('MMMM DD, YYYY')
|
|
6332
6362
|
),
|
|
@@ -6376,7 +6406,6 @@ var usePrevious = function usePrevious(value) {
|
|
|
6376
6406
|
};
|
|
6377
6407
|
|
|
6378
6408
|
var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
6379
|
-
|
|
6380
6409
|
var router$$1 = router.useRouter();
|
|
6381
6410
|
var initialData = props.dataRecord,
|
|
6382
6411
|
client = props.client,
|
|
@@ -6387,8 +6416,10 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
6387
6416
|
pointerArray = props.pointerArray,
|
|
6388
6417
|
mapping = props.mapping,
|
|
6389
6418
|
seoPaginate = props.seoPaginate,
|
|
6390
|
-
pageview = props.pageview
|
|
6391
|
-
|
|
6419
|
+
pageview = props.pageview,
|
|
6420
|
+
defaultImage = props.defaultImage;
|
|
6421
|
+
var initialCurrentPage = props.currentPage,
|
|
6422
|
+
showPublished = props.showPublished;
|
|
6392
6423
|
|
|
6393
6424
|
var builder = imageUrlBuilder(client);
|
|
6394
6425
|
|
|
@@ -6445,7 +6476,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
6445
6476
|
React__default.createElement(
|
|
6446
6477
|
reactBootstrap.Container,
|
|
6447
6478
|
null,
|
|
6448
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage)
|
|
6479
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage)
|
|
6449
6480
|
)
|
|
6450
6481
|
),
|
|
6451
6482
|
React__default.createElement(
|
|
@@ -6459,7 +6490,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
6459
6490
|
React__default.createElement(
|
|
6460
6491
|
reactBootstrap.Container,
|
|
6461
6492
|
null,
|
|
6462
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage)
|
|
6493
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage)
|
|
6463
6494
|
),
|
|
6464
6495
|
React__default.createElement(
|
|
6465
6496
|
'div',
|
|
@@ -7110,7 +7141,7 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
7110
7141
|
Nav,
|
|
7111
7142
|
{ className: 'mr-auto' },
|
|
7112
7143
|
dataObject && dataObject.map(function (row, index) {
|
|
7113
|
-
if (row.subQuery.length >
|
|
7144
|
+
if (row.subQuery && row.subQuery.length > 0) {
|
|
7114
7145
|
return React__default.createElement(
|
|
7115
7146
|
NavDropdown,
|
|
7116
7147
|
{ key: index, title: row.name, id: 'basic-nav-dropdown' },
|
|
@@ -7303,7 +7334,7 @@ var NavDvm = function NavDvm(props) {
|
|
|
7303
7334
|
|
|
7304
7335
|
|
|
7305
7336
|
var getLink = function getLink(url, className, name, key, blank) {
|
|
7306
|
-
if (url.includes('https://') || url.includes('http://')) {
|
|
7337
|
+
if (url && (url.includes('https://') || url.includes('http://'))) {
|
|
7307
7338
|
return React__default.createElement(
|
|
7308
7339
|
'a',
|
|
7309
7340
|
{ target: blank ? '_blank' : '_self', key: key, href: url || '#', className: className },
|
|
@@ -12153,6 +12184,27 @@ var IFrame = function IFrame(_ref) {
|
|
|
12153
12184
|
);
|
|
12154
12185
|
};
|
|
12155
12186
|
|
|
12187
|
+
var Audio = function Audio(_ref) {
|
|
12188
|
+
var node = _ref.node;
|
|
12189
|
+
|
|
12190
|
+
return React__default.createElement(
|
|
12191
|
+
'div',
|
|
12192
|
+
{ className: 'd-block text-center mb-3' },
|
|
12193
|
+
React__default.createElement(
|
|
12194
|
+
'audio',
|
|
12195
|
+
{ controls: true },
|
|
12196
|
+
React__default.createElement('source', { src: node.uploadAudio ? node.uploadAudio.asset.url : node.audioFilePth, type: 'audio/ogg' }),
|
|
12197
|
+
React__default.createElement('source', { src: node.uploadAudio ? node.uploadAudio.asset.url : node.audioFilePth, type: 'audio/mpeg' }),
|
|
12198
|
+
'Your browser does not support the audio element.'
|
|
12199
|
+
),
|
|
12200
|
+
node.caption && React__default.createElement(
|
|
12201
|
+
'p',
|
|
12202
|
+
null,
|
|
12203
|
+
node.caption
|
|
12204
|
+
)
|
|
12205
|
+
);
|
|
12206
|
+
};
|
|
12207
|
+
|
|
12156
12208
|
var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
12157
12209
|
var nodes = _ref.nodes,
|
|
12158
12210
|
client = _ref.client;
|
|
@@ -12376,6 +12428,11 @@ var getSerializers$1 = function getSerializers(client, pageview) {
|
|
|
12376
12428
|
var node = _ref8.node;
|
|
12377
12429
|
|
|
12378
12430
|
return React__default.createElement(IFrame, { url: node.url });
|
|
12431
|
+
},
|
|
12432
|
+
audio: function audio(_ref9) {
|
|
12433
|
+
var node = _ref9.node;
|
|
12434
|
+
|
|
12435
|
+
return React__default.createElement(Audio, { node: node });
|
|
12379
12436
|
}
|
|
12380
12437
|
},
|
|
12381
12438
|
marks: {
|
|
@@ -12463,7 +12520,7 @@ var Feature = function Feature(props) {
|
|
|
12463
12520
|
};
|
|
12464
12521
|
|
|
12465
12522
|
exports.DeckContent = ContentCard;
|
|
12466
|
-
exports.GridContent = GridContent;
|
|
12523
|
+
exports.GridContent = GridContent$1;
|
|
12467
12524
|
exports.DeckQueue = DeckQueue;
|
|
12468
12525
|
exports.ThumbnailCard = ThumbnailCard;
|
|
12469
12526
|
exports.TaxonomyCard = TaxonomyCard;
|