@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/dist/index.js
CHANGED
|
@@ -28,6 +28,7 @@ var FormControl = _interopDefault(require('react-bootstrap/FormControl'));
|
|
|
28
28
|
var Nav = _interopDefault(require('react-bootstrap/Nav'));
|
|
29
29
|
var Navbar = _interopDefault(require('react-bootstrap/Navbar'));
|
|
30
30
|
var NavDropdown = _interopDefault(require('react-bootstrap/NavDropdown'));
|
|
31
|
+
var ReactPlayer = _interopDefault(require('react-player'));
|
|
31
32
|
var Pagination = _interopDefault(require('react-bootstrap/Pagination'));
|
|
32
33
|
var Carousel = _interopDefault(require('react-bootstrap/Carousel'));
|
|
33
34
|
var Breadcrumb = _interopDefault(require('react-bootstrap/Breadcrumb'));
|
|
@@ -9513,7 +9514,7 @@ var DeckContent = function (_React$Component) {
|
|
|
9513
9514
|
React__default.createElement(
|
|
9514
9515
|
Card,
|
|
9515
9516
|
{ className: 'content-card', style: { flexDirection: mode } },
|
|
9516
|
-
React__default.createElement(
|
|
9517
|
+
(row.thumbnail && row.thumbnail.asset || _this.props.defaultImage) && React__default.createElement(
|
|
9517
9518
|
Link,
|
|
9518
9519
|
{ href: _this.mapping[contentCategoryName] + '/[url]', as: _this.mapping[contentCategoryName] + '/' + row.url.current },
|
|
9519
9520
|
React__default.createElement(
|
|
@@ -10989,7 +10990,7 @@ var GridContent = function (_React$Component) {
|
|
|
10989
10990
|
React__default.createElement(
|
|
10990
10991
|
Card,
|
|
10991
10992
|
{ className: 'content-card', style: { flexDirection: index$$1 === 0 || index$$1 % 4 === 0 ? 'top' : 'row' } },
|
|
10992
|
-
React__default.createElement(
|
|
10993
|
+
(row.thumbnail && row.thumbnail.asset || _this2.props.defaultImage) && React__default.createElement(
|
|
10993
10994
|
Link,
|
|
10994
10995
|
{ href: _this2.mapping[contentCategoryName] + '/[url]', as: _this2.mapping[contentCategoryName] + '/' + row.url.current },
|
|
10995
10996
|
React__default.createElement(
|
|
@@ -11311,7 +11312,7 @@ var DeckQueue = function (_React$Component) {
|
|
|
11311
11312
|
React__default.createElement(
|
|
11312
11313
|
Row,
|
|
11313
11314
|
{ style: { flexDirection: mode } },
|
|
11314
|
-
React__default.createElement(
|
|
11315
|
+
(row.thumbnail && row.thumbnail.asset || _this2.props.defaultImage) && React__default.createElement(
|
|
11315
11316
|
Col,
|
|
11316
11317
|
{ md: 12, lg: 4 },
|
|
11317
11318
|
React__default.createElement(
|
|
@@ -12085,6 +12086,105 @@ var renderAuthor = function renderAuthor(authorDetail, index$$1, length) {
|
|
|
12085
12086
|
} else return null;
|
|
12086
12087
|
};
|
|
12087
12088
|
|
|
12089
|
+
var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems) {
|
|
12090
|
+
var numberOfItemsBeforeAd = 6;
|
|
12091
|
+
return React__default.createElement(
|
|
12092
|
+
'div',
|
|
12093
|
+
null,
|
|
12094
|
+
data && data.map(function (article, index$$1) {
|
|
12095
|
+
var pageNumber = article.pageNumber || values.page;
|
|
12096
|
+
var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
|
|
12097
|
+
return React__default.createElement(
|
|
12098
|
+
React__default.Fragment,
|
|
12099
|
+
{ key: article._id ? article._id : index$$1 },
|
|
12100
|
+
React__default.createElement(
|
|
12101
|
+
VisibilitySensor,
|
|
12102
|
+
{
|
|
12103
|
+
key: article._id ? article._id : index$$1,
|
|
12104
|
+
onChange: function onChange(isVisible) {
|
|
12105
|
+
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router$$1, currentPage, setCurrentPage);
|
|
12106
|
+
} },
|
|
12107
|
+
React__default.createElement(
|
|
12108
|
+
React__default.Fragment,
|
|
12109
|
+
null,
|
|
12110
|
+
React__default.createElement(
|
|
12111
|
+
reactBootstrap.Media,
|
|
12112
|
+
{ key: article._id ? article._id : index$$1, style: { marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
12113
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
12114
|
+
Link,
|
|
12115
|
+
{ href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
12116
|
+
React__default.createElement(
|
|
12117
|
+
'a',
|
|
12118
|
+
{ className: 'img-wrapper' },
|
|
12119
|
+
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 })
|
|
12120
|
+
)
|
|
12121
|
+
),
|
|
12122
|
+
React__default.createElement(
|
|
12123
|
+
reactBootstrap.Media.Body,
|
|
12124
|
+
null,
|
|
12125
|
+
React__default.createElement(
|
|
12126
|
+
Link,
|
|
12127
|
+
{ href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
12128
|
+
React__default.createElement(
|
|
12129
|
+
'a',
|
|
12130
|
+
null,
|
|
12131
|
+
article.title && React__default.createElement(
|
|
12132
|
+
'h4',
|
|
12133
|
+
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
12134
|
+
article.title
|
|
12135
|
+
)
|
|
12136
|
+
)
|
|
12137
|
+
),
|
|
12138
|
+
showPublished && article.published && React__default.createElement(
|
|
12139
|
+
'p',
|
|
12140
|
+
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
12141
|
+
moment(article.published).format('MMMM DD, YYYY')
|
|
12142
|
+
),
|
|
12143
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index$$1) {
|
|
12144
|
+
return renderAuthor(authorDetail, index$$1, article.authorMapping.length);
|
|
12145
|
+
}),
|
|
12146
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
12147
|
+
'p',
|
|
12148
|
+
{
|
|
12149
|
+
style: {
|
|
12150
|
+
background: 'var(--highlight)',
|
|
12151
|
+
color: 'var(--highlight-accent)',
|
|
12152
|
+
marginBottom: '.25rem',
|
|
12153
|
+
display: 'inline-block',
|
|
12154
|
+
padding: '0 .25rem',
|
|
12155
|
+
fontSize: '.8rem'
|
|
12156
|
+
} },
|
|
12157
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
12158
|
+
),
|
|
12159
|
+
article.summary && React__default.createElement(
|
|
12160
|
+
'p',
|
|
12161
|
+
{ className: 'pt-2 card-text' },
|
|
12162
|
+
article.summary
|
|
12163
|
+
)
|
|
12164
|
+
)
|
|
12165
|
+
)
|
|
12166
|
+
)
|
|
12167
|
+
),
|
|
12168
|
+
main_36 && rightItems && (index$$1 + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index$$1, numberOfItemsBeforeAd, rightItems)
|
|
12169
|
+
);
|
|
12170
|
+
}),
|
|
12171
|
+
React__default.createElement(
|
|
12172
|
+
'style',
|
|
12173
|
+
{ jsx: true },
|
|
12174
|
+
'\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 '
|
|
12175
|
+
)
|
|
12176
|
+
);
|
|
12177
|
+
};
|
|
12178
|
+
|
|
12179
|
+
var renderMobileAd = function renderMobileAd(index$$1, numberOfItemsBeforeAd, rightItems) {
|
|
12180
|
+
var i = ((index$$1 + 1) / numberOfItemsBeforeAd - 1) % rightItems.length;
|
|
12181
|
+
return React__default.createElement(
|
|
12182
|
+
'div',
|
|
12183
|
+
null,
|
|
12184
|
+
rightItems[i].component
|
|
12185
|
+
);
|
|
12186
|
+
};
|
|
12187
|
+
|
|
12088
12188
|
var renderManualPagination = function renderManualPagination(currentPage) {
|
|
12089
12189
|
return React__default.createElement(
|
|
12090
12190
|
'div',
|
|
@@ -12126,7 +12226,8 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
12126
12226
|
showAuthor = props.showAuthor,
|
|
12127
12227
|
showCategory = props.showCategory,
|
|
12128
12228
|
imageHeight = props.imageHeight,
|
|
12129
|
-
imageWidth = props.imageWidth
|
|
12229
|
+
imageWidth = props.imageWidth,
|
|
12230
|
+
rightItems = props.rightItems;
|
|
12130
12231
|
var initialCurrentPage = props.currentPage,
|
|
12131
12232
|
showPublished = props.showPublished;
|
|
12132
12233
|
|
|
@@ -12170,102 +12271,6 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
12170
12271
|
}
|
|
12171
12272
|
}, [values, prevValues, query, client, params, setData, setScrolling, pointer, pointerArray]);
|
|
12172
12273
|
|
|
12173
|
-
var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth) {
|
|
12174
|
-
var numberOfItemsBeforeAd = 6;
|
|
12175
|
-
return React__default.createElement(
|
|
12176
|
-
'div',
|
|
12177
|
-
null,
|
|
12178
|
-
data && data.map(function (article, index$$1) {
|
|
12179
|
-
var pageNumber = article.pageNumber || values.page;
|
|
12180
|
-
var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
|
|
12181
|
-
return React__default.createElement(
|
|
12182
|
-
React__default.Fragment,
|
|
12183
|
-
{ key: article._id ? article._id : index$$1 },
|
|
12184
|
-
React__default.createElement(
|
|
12185
|
-
VisibilitySensor,
|
|
12186
|
-
{
|
|
12187
|
-
key: article._id ? article._id : index$$1,
|
|
12188
|
-
onChange: function onChange(isVisible) {
|
|
12189
|
-
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router$$1, currentPage, setCurrentPage);
|
|
12190
|
-
} },
|
|
12191
|
-
React__default.createElement(
|
|
12192
|
-
React__default.Fragment,
|
|
12193
|
-
null,
|
|
12194
|
-
React__default.createElement(
|
|
12195
|
-
reactBootstrap.Media,
|
|
12196
|
-
{ key: article._id ? article._id : index$$1, style: { marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
12197
|
-
React__default.createElement(
|
|
12198
|
-
Link,
|
|
12199
|
-
{ href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
12200
|
-
React__default.createElement(
|
|
12201
|
-
'a',
|
|
12202
|
-
null,
|
|
12203
|
-
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 })
|
|
12204
|
-
)
|
|
12205
|
-
),
|
|
12206
|
-
React__default.createElement(
|
|
12207
|
-
reactBootstrap.Media.Body,
|
|
12208
|
-
null,
|
|
12209
|
-
React__default.createElement(
|
|
12210
|
-
Link,
|
|
12211
|
-
{ href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
12212
|
-
React__default.createElement(
|
|
12213
|
-
'a',
|
|
12214
|
-
null,
|
|
12215
|
-
article.title && React__default.createElement(
|
|
12216
|
-
'h4',
|
|
12217
|
-
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
12218
|
-
article.title
|
|
12219
|
-
)
|
|
12220
|
-
)
|
|
12221
|
-
),
|
|
12222
|
-
showPublished && article.published && React__default.createElement(
|
|
12223
|
-
'p',
|
|
12224
|
-
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
12225
|
-
moment(article.published).format('MMMM DD, YYYY')
|
|
12226
|
-
),
|
|
12227
|
-
showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index$$1) {
|
|
12228
|
-
return renderAuthor(authorDetail, index$$1, article.authorMapping.length);
|
|
12229
|
-
}),
|
|
12230
|
-
showCategory && article.contentCategory && React__default.createElement(
|
|
12231
|
-
'p',
|
|
12232
|
-
{
|
|
12233
|
-
style: {
|
|
12234
|
-
background: 'var(--highlight)',
|
|
12235
|
-
color: 'var(--highlight-accent)',
|
|
12236
|
-
marginBottom: '.25rem',
|
|
12237
|
-
display: 'inline-block',
|
|
12238
|
-
padding: '0 .25rem',
|
|
12239
|
-
fontSize: '.8rem'
|
|
12240
|
-
} },
|
|
12241
|
-
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
12242
|
-
),
|
|
12243
|
-
article.summary && React__default.createElement(
|
|
12244
|
-
'p',
|
|
12245
|
-
{ className: 'pt-2 card-text' },
|
|
12246
|
-
article.summary
|
|
12247
|
-
)
|
|
12248
|
-
)
|
|
12249
|
-
)
|
|
12250
|
-
)
|
|
12251
|
-
),
|
|
12252
|
-
main_36 && props.rightItems && (index$$1 + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index$$1, numberOfItemsBeforeAd)
|
|
12253
|
-
);
|
|
12254
|
-
})
|
|
12255
|
-
);
|
|
12256
|
-
};
|
|
12257
|
-
|
|
12258
|
-
var renderMobileAd = function renderMobileAd(index$$1, numberOfItemsBeforeAd) {
|
|
12259
|
-
var rightItems = props.rightItems;
|
|
12260
|
-
|
|
12261
|
-
var i = ((index$$1 + 1) / numberOfItemsBeforeAd - 1) % rightItems.length;
|
|
12262
|
-
return React__default.createElement(
|
|
12263
|
-
'div',
|
|
12264
|
-
null,
|
|
12265
|
-
rightItems[i].component
|
|
12266
|
-
);
|
|
12267
|
-
};
|
|
12268
|
-
|
|
12269
12274
|
return React__default.createElement(
|
|
12270
12275
|
'div',
|
|
12271
12276
|
null,
|
|
@@ -12280,7 +12285,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
12280
12285
|
React__default.createElement(
|
|
12281
12286
|
reactBootstrap.Container,
|
|
12282
12287
|
null,
|
|
12283
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth)
|
|
12288
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems)
|
|
12284
12289
|
)
|
|
12285
12290
|
),
|
|
12286
12291
|
React__default.createElement(
|
|
@@ -12294,7 +12299,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
12294
12299
|
React__default.createElement(
|
|
12295
12300
|
reactBootstrap.Container,
|
|
12296
12301
|
null,
|
|
12297
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory)
|
|
12302
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems)
|
|
12298
12303
|
),
|
|
12299
12304
|
React__default.createElement(
|
|
12300
12305
|
'div',
|
|
@@ -20373,22 +20378,31 @@ var Video = function Video(_ref) {
|
|
|
20373
20378
|
var Audio = function Audio(_ref) {
|
|
20374
20379
|
var node = _ref.node;
|
|
20375
20380
|
|
|
20376
|
-
|
|
20377
|
-
|
|
20378
|
-
|
|
20379
|
-
|
|
20380
|
-
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
|
|
20384
|
-
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
|
|
20388
|
-
|
|
20389
|
-
|
|
20390
|
-
)
|
|
20391
|
-
|
|
20381
|
+
if (node.uploadAudio) {
|
|
20382
|
+
return React__default.createElement(
|
|
20383
|
+
'div',
|
|
20384
|
+
{ className: 'audio d-block text-center mb-3' },
|
|
20385
|
+
React__default.createElement(
|
|
20386
|
+
'audio',
|
|
20387
|
+
{ controls: true, controlsList: 'nodownload', className: 'audio' },
|
|
20388
|
+
React__default.createElement('source', { src: node.uploadAudio.asset.url, type: 'audio/ogg' }),
|
|
20389
|
+
React__default.createElement('source', { src: node.uploadAudio.asset.url, type: 'audio/mpeg' }),
|
|
20390
|
+
'Your browser does not support the audio element.'
|
|
20391
|
+
)
|
|
20392
|
+
);
|
|
20393
|
+
} else if (node.audioFilePth) {
|
|
20394
|
+
var hostname = new URL(node.audioFilePth).hostname;
|
|
20395
|
+
if (hostname === 'embeds.audioboom.com') {
|
|
20396
|
+
return React__default.createElement('iframe', { src: node.audioFilePth, width: '100%', height: '300', className: 'audio', style: { border: 'none' } });
|
|
20397
|
+
}
|
|
20398
|
+
return React__default.createElement(
|
|
20399
|
+
'div',
|
|
20400
|
+
{ className: 'audio' },
|
|
20401
|
+
React__default.createElement(ReactPlayer, { url: node.audioFilePth, controls: true, width: '100%', height: '100%' })
|
|
20402
|
+
);
|
|
20403
|
+
}
|
|
20404
|
+
|
|
20405
|
+
return null;
|
|
20392
20406
|
};
|
|
20393
20407
|
|
|
20394
20408
|
var YouTubeGallery = function YouTubeGallery(_ref) {
|