@mjhls/mjh-framework 1.0.121 → 1.0.122
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 +133 -119
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +132 -118
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, { Component, useState, useEffect, useRef,
|
|
1
|
+
import React__default, { Component, useState, useEffect, useRef, createElement, createContext } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import reactDom from 'react-dom';
|
|
4
4
|
import Container from 'react-bootstrap/Container';
|
|
@@ -21,6 +21,7 @@ import FormControl from 'react-bootstrap/FormControl';
|
|
|
21
21
|
import Nav from 'react-bootstrap/Nav';
|
|
22
22
|
import Navbar from 'react-bootstrap/Navbar';
|
|
23
23
|
import NavDropdown from 'react-bootstrap/NavDropdown';
|
|
24
|
+
import ReactPlayer from 'react-player';
|
|
24
25
|
import Pagination from 'react-bootstrap/Pagination';
|
|
25
26
|
import Carousel$1 from 'react-bootstrap/Carousel';
|
|
26
27
|
import Breadcrumb from 'react-bootstrap/Breadcrumb';
|
|
@@ -9506,7 +9507,7 @@ var DeckContent = function (_React$Component) {
|
|
|
9506
9507
|
React__default.createElement(
|
|
9507
9508
|
Card,
|
|
9508
9509
|
{ className: 'content-card', style: { flexDirection: mode } },
|
|
9509
|
-
React__default.createElement(
|
|
9510
|
+
(row.thumbnail && row.thumbnail.asset || _this.props.defaultImage) && React__default.createElement(
|
|
9510
9511
|
Link,
|
|
9511
9512
|
{ href: _this.mapping[contentCategoryName] + '/[url]', as: _this.mapping[contentCategoryName] + '/' + row.url.current },
|
|
9512
9513
|
React__default.createElement(
|
|
@@ -10982,7 +10983,7 @@ var GridContent = function (_React$Component) {
|
|
|
10982
10983
|
React__default.createElement(
|
|
10983
10984
|
Card,
|
|
10984
10985
|
{ className: 'content-card', style: { flexDirection: index$$1 === 0 || index$$1 % 4 === 0 ? 'top' : 'row' } },
|
|
10985
|
-
React__default.createElement(
|
|
10986
|
+
(row.thumbnail && row.thumbnail.asset || _this2.props.defaultImage) && React__default.createElement(
|
|
10986
10987
|
Link,
|
|
10987
10988
|
{ href: _this2.mapping[contentCategoryName] + '/[url]', as: _this2.mapping[contentCategoryName] + '/' + row.url.current },
|
|
10988
10989
|
React__default.createElement(
|
|
@@ -11304,7 +11305,7 @@ var DeckQueue = function (_React$Component) {
|
|
|
11304
11305
|
React__default.createElement(
|
|
11305
11306
|
Row,
|
|
11306
11307
|
{ style: { flexDirection: mode } },
|
|
11307
|
-
React__default.createElement(
|
|
11308
|
+
(row.thumbnail && row.thumbnail.asset || _this2.props.defaultImage) && React__default.createElement(
|
|
11308
11309
|
Col,
|
|
11309
11310
|
{ md: 12, lg: 4 },
|
|
11310
11311
|
React__default.createElement(
|
|
@@ -12078,6 +12079,105 @@ var renderAuthor = function renderAuthor(authorDetail, index$$1, length) {
|
|
|
12078
12079
|
} else return null;
|
|
12079
12080
|
};
|
|
12080
12081
|
|
|
12082
|
+
var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems) {
|
|
12083
|
+
var numberOfItemsBeforeAd = 6;
|
|
12084
|
+
return React__default.createElement(
|
|
12085
|
+
'div',
|
|
12086
|
+
null,
|
|
12087
|
+
data && data.map(function (article, index$$1) {
|
|
12088
|
+
var pageNumber = article.pageNumber || values.page;
|
|
12089
|
+
var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
|
|
12090
|
+
return React__default.createElement(
|
|
12091
|
+
React__default.Fragment,
|
|
12092
|
+
{ key: article._id ? article._id : index$$1 },
|
|
12093
|
+
React__default.createElement(
|
|
12094
|
+
VisibilitySensor,
|
|
12095
|
+
{
|
|
12096
|
+
key: article._id ? article._id : index$$1,
|
|
12097
|
+
onChange: function onChange(isVisible) {
|
|
12098
|
+
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
|
|
12099
|
+
} },
|
|
12100
|
+
React__default.createElement(
|
|
12101
|
+
React__default.Fragment,
|
|
12102
|
+
null,
|
|
12103
|
+
React__default.createElement(
|
|
12104
|
+
Media$1,
|
|
12105
|
+
{ key: article._id ? article._id : index$$1, style: { marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
12106
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
12107
|
+
Link,
|
|
12108
|
+
{ href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
12109
|
+
React__default.createElement(
|
|
12110
|
+
'a',
|
|
12111
|
+
{ className: 'img-wrapper' },
|
|
12112
|
+
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 })
|
|
12113
|
+
)
|
|
12114
|
+
),
|
|
12115
|
+
React__default.createElement(
|
|
12116
|
+
Media$1.Body,
|
|
12117
|
+
null,
|
|
12118
|
+
React__default.createElement(
|
|
12119
|
+
Link,
|
|
12120
|
+
{ href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
12121
|
+
React__default.createElement(
|
|
12122
|
+
'a',
|
|
12123
|
+
null,
|
|
12124
|
+
article.title && React__default.createElement(
|
|
12125
|
+
'h4',
|
|
12126
|
+
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
12127
|
+
article.title
|
|
12128
|
+
)
|
|
12129
|
+
)
|
|
12130
|
+
),
|
|
12131
|
+
showPublished && article.published && React__default.createElement(
|
|
12132
|
+
'p',
|
|
12133
|
+
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
12134
|
+
moment(article.published).format('MMMM DD, YYYY')
|
|
12135
|
+
),
|
|
12136
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index$$1) {
|
|
12137
|
+
return renderAuthor(authorDetail, index$$1, article.authorMapping.length);
|
|
12138
|
+
}),
|
|
12139
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
12140
|
+
'p',
|
|
12141
|
+
{
|
|
12142
|
+
style: {
|
|
12143
|
+
background: 'var(--highlight)',
|
|
12144
|
+
color: 'var(--highlight-accent)',
|
|
12145
|
+
marginBottom: '.25rem',
|
|
12146
|
+
display: 'inline-block',
|
|
12147
|
+
padding: '0 .25rem',
|
|
12148
|
+
fontSize: '.8rem'
|
|
12149
|
+
} },
|
|
12150
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
12151
|
+
),
|
|
12152
|
+
article.summary && React__default.createElement(
|
|
12153
|
+
'p',
|
|
12154
|
+
{ className: 'pt-2 card-text' },
|
|
12155
|
+
article.summary
|
|
12156
|
+
)
|
|
12157
|
+
)
|
|
12158
|
+
)
|
|
12159
|
+
)
|
|
12160
|
+
),
|
|
12161
|
+
main_36 && rightItems && (index$$1 + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index$$1, numberOfItemsBeforeAd, rightItems)
|
|
12162
|
+
);
|
|
12163
|
+
}),
|
|
12164
|
+
React__default.createElement(
|
|
12165
|
+
'style',
|
|
12166
|
+
{ jsx: true },
|
|
12167
|
+
'\n .img-wrapper img {\n max-height: 200px;\n width: 100%;\n object-fit: cover;\n }\n @media only screen and (min-width: 768px) {\n .img-wrapper {\n width: 42%;\n }\n .img-wrapper > img {\n padding-right: 1em;\n }\n }\n @media only screen and (max-width: 767px) {\n .img-wrapper {\n width: 100%;\n }\n .img-wrapper img {\n padding-bottom: 1em;\n }\n .media {\n flex-direction: column;\n }\n }\n '
|
|
12168
|
+
)
|
|
12169
|
+
);
|
|
12170
|
+
};
|
|
12171
|
+
|
|
12172
|
+
var renderMobileAd = function renderMobileAd(index$$1, numberOfItemsBeforeAd, rightItems) {
|
|
12173
|
+
var i = ((index$$1 + 1) / numberOfItemsBeforeAd - 1) % rightItems.length;
|
|
12174
|
+
return React__default.createElement(
|
|
12175
|
+
'div',
|
|
12176
|
+
null,
|
|
12177
|
+
rightItems[i].component
|
|
12178
|
+
);
|
|
12179
|
+
};
|
|
12180
|
+
|
|
12081
12181
|
var renderManualPagination = function renderManualPagination(currentPage) {
|
|
12082
12182
|
return React__default.createElement(
|
|
12083
12183
|
'div',
|
|
@@ -12119,7 +12219,8 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
12119
12219
|
showAuthor = props.showAuthor,
|
|
12120
12220
|
showCategory = props.showCategory,
|
|
12121
12221
|
imageHeight = props.imageHeight,
|
|
12122
|
-
imageWidth = props.imageWidth
|
|
12222
|
+
imageWidth = props.imageWidth,
|
|
12223
|
+
rightItems = props.rightItems;
|
|
12123
12224
|
var initialCurrentPage = props.currentPage,
|
|
12124
12225
|
showPublished = props.showPublished;
|
|
12125
12226
|
|
|
@@ -12163,102 +12264,6 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
12163
12264
|
}
|
|
12164
12265
|
}, [values, prevValues, query, client, params, setData, setScrolling, pointer, pointerArray]);
|
|
12165
12266
|
|
|
12166
|
-
var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth) {
|
|
12167
|
-
var numberOfItemsBeforeAd = 6;
|
|
12168
|
-
return React__default.createElement(
|
|
12169
|
-
'div',
|
|
12170
|
-
null,
|
|
12171
|
-
data && data.map(function (article, index$$1) {
|
|
12172
|
-
var pageNumber = article.pageNumber || values.page;
|
|
12173
|
-
var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
|
|
12174
|
-
return React__default.createElement(
|
|
12175
|
-
React__default.Fragment,
|
|
12176
|
-
{ key: article._id ? article._id : index$$1 },
|
|
12177
|
-
React__default.createElement(
|
|
12178
|
-
VisibilitySensor,
|
|
12179
|
-
{
|
|
12180
|
-
key: article._id ? article._id : index$$1,
|
|
12181
|
-
onChange: function onChange(isVisible) {
|
|
12182
|
-
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
|
|
12183
|
-
} },
|
|
12184
|
-
React__default.createElement(
|
|
12185
|
-
React__default.Fragment,
|
|
12186
|
-
null,
|
|
12187
|
-
React__default.createElement(
|
|
12188
|
-
Media$1,
|
|
12189
|
-
{ key: article._id ? article._id : index$$1, style: { marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
12190
|
-
React__default.createElement(
|
|
12191
|
-
Link,
|
|
12192
|
-
{ href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
12193
|
-
React__default.createElement(
|
|
12194
|
-
'a',
|
|
12195
|
-
null,
|
|
12196
|
-
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'mr-3', 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 })
|
|
12197
|
-
)
|
|
12198
|
-
),
|
|
12199
|
-
React__default.createElement(
|
|
12200
|
-
Media$1.Body,
|
|
12201
|
-
null,
|
|
12202
|
-
React__default.createElement(
|
|
12203
|
-
Link,
|
|
12204
|
-
{ href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
12205
|
-
React__default.createElement(
|
|
12206
|
-
'a',
|
|
12207
|
-
null,
|
|
12208
|
-
article.title && React__default.createElement(
|
|
12209
|
-
'h4',
|
|
12210
|
-
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
12211
|
-
article.title
|
|
12212
|
-
)
|
|
12213
|
-
)
|
|
12214
|
-
),
|
|
12215
|
-
showPublished && article.published && React__default.createElement(
|
|
12216
|
-
'p',
|
|
12217
|
-
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
12218
|
-
moment(article.published).format('MMMM DD, YYYY')
|
|
12219
|
-
),
|
|
12220
|
-
showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index$$1) {
|
|
12221
|
-
return renderAuthor(authorDetail, index$$1, article.authorMapping.length);
|
|
12222
|
-
}),
|
|
12223
|
-
showCategory && article.contentCategory && React__default.createElement(
|
|
12224
|
-
'p',
|
|
12225
|
-
{
|
|
12226
|
-
style: {
|
|
12227
|
-
background: 'var(--highlight)',
|
|
12228
|
-
color: 'var(--highlight-accent)',
|
|
12229
|
-
marginBottom: '.25rem',
|
|
12230
|
-
display: 'inline-block',
|
|
12231
|
-
padding: '0 .25rem',
|
|
12232
|
-
fontSize: '.8rem'
|
|
12233
|
-
} },
|
|
12234
|
-
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
12235
|
-
),
|
|
12236
|
-
article.summary && React__default.createElement(
|
|
12237
|
-
'p',
|
|
12238
|
-
{ className: 'pt-2 card-text' },
|
|
12239
|
-
article.summary
|
|
12240
|
-
)
|
|
12241
|
-
)
|
|
12242
|
-
)
|
|
12243
|
-
)
|
|
12244
|
-
),
|
|
12245
|
-
main_36 && props.rightItems && (index$$1 + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index$$1, numberOfItemsBeforeAd)
|
|
12246
|
-
);
|
|
12247
|
-
})
|
|
12248
|
-
);
|
|
12249
|
-
};
|
|
12250
|
-
|
|
12251
|
-
var renderMobileAd = function renderMobileAd(index$$1, numberOfItemsBeforeAd) {
|
|
12252
|
-
var rightItems = props.rightItems;
|
|
12253
|
-
|
|
12254
|
-
var i = ((index$$1 + 1) / numberOfItemsBeforeAd - 1) % rightItems.length;
|
|
12255
|
-
return React__default.createElement(
|
|
12256
|
-
'div',
|
|
12257
|
-
null,
|
|
12258
|
-
rightItems[i].component
|
|
12259
|
-
);
|
|
12260
|
-
};
|
|
12261
|
-
|
|
12262
12267
|
return React__default.createElement(
|
|
12263
12268
|
'div',
|
|
12264
12269
|
null,
|
|
@@ -12273,7 +12278,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
12273
12278
|
React__default.createElement(
|
|
12274
12279
|
Container$1,
|
|
12275
12280
|
null,
|
|
12276
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth)
|
|
12281
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems)
|
|
12277
12282
|
)
|
|
12278
12283
|
),
|
|
12279
12284
|
React__default.createElement(
|
|
@@ -12287,7 +12292,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
12287
12292
|
React__default.createElement(
|
|
12288
12293
|
Container$1,
|
|
12289
12294
|
null,
|
|
12290
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory)
|
|
12295
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems)
|
|
12291
12296
|
),
|
|
12292
12297
|
React__default.createElement(
|
|
12293
12298
|
'div',
|
|
@@ -20366,22 +20371,31 @@ var Video = function Video(_ref) {
|
|
|
20366
20371
|
var Audio = function Audio(_ref) {
|
|
20367
20372
|
var node = _ref.node;
|
|
20368
20373
|
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
|
|
20373
|
-
|
|
20374
|
-
|
|
20375
|
-
|
|
20376
|
-
|
|
20377
|
-
|
|
20378
|
-
|
|
20379
|
-
|
|
20380
|
-
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
)
|
|
20384
|
-
|
|
20374
|
+
if (node.uploadAudio) {
|
|
20375
|
+
return React__default.createElement(
|
|
20376
|
+
'div',
|
|
20377
|
+
{ className: 'audio d-block text-center mb-3' },
|
|
20378
|
+
React__default.createElement(
|
|
20379
|
+
'audio',
|
|
20380
|
+
{ controls: true, controlsList: 'nodownload', className: 'audio' },
|
|
20381
|
+
React__default.createElement('source', { src: node.uploadAudio.asset.url, type: 'audio/ogg' }),
|
|
20382
|
+
React__default.createElement('source', { src: node.uploadAudio.asset.url, type: 'audio/mpeg' }),
|
|
20383
|
+
'Your browser does not support the audio element.'
|
|
20384
|
+
)
|
|
20385
|
+
);
|
|
20386
|
+
} else if (node.audioFilePth) {
|
|
20387
|
+
var hostname = new URL(node.audioFilePth).hostname;
|
|
20388
|
+
if (hostname === 'embeds.audioboom.com') {
|
|
20389
|
+
return React__default.createElement('iframe', { src: node.audioFilePth, width: '100%', height: '300', className: 'audio', style: { border: 'none' } });
|
|
20390
|
+
}
|
|
20391
|
+
return React__default.createElement(
|
|
20392
|
+
'div',
|
|
20393
|
+
{ className: 'audio' },
|
|
20394
|
+
React__default.createElement(ReactPlayer, { url: node.audioFilePth, controls: true, width: '100%', height: '100%' })
|
|
20395
|
+
);
|
|
20396
|
+
}
|
|
20397
|
+
|
|
20398
|
+
return null;
|
|
20385
20399
|
};
|
|
20386
20400
|
|
|
20387
20401
|
var YouTubeGallery = function YouTubeGallery(_ref) {
|