@mjhls/mjh-framework 1.0.142 → 1.0.143
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 +77 -42
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +76 -41
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6338,13 +6338,13 @@ var GridContent = function (_React$Component) {
|
|
|
6338
6338
|
Card.Body,
|
|
6339
6339
|
{ style: { padding: '20px' } },
|
|
6340
6340
|
React__default.createElement(
|
|
6341
|
-
|
|
6342
|
-
|
|
6341
|
+
Card.Title,
|
|
6342
|
+
null,
|
|
6343
6343
|
React__default.createElement(
|
|
6344
|
-
|
|
6345
|
-
|
|
6344
|
+
Link,
|
|
6345
|
+
{ href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
|
|
6346
6346
|
React__default.createElement(
|
|
6347
|
-
|
|
6347
|
+
'a',
|
|
6348
6348
|
null,
|
|
6349
6349
|
row.title
|
|
6350
6350
|
)
|
|
@@ -6401,7 +6401,7 @@ var GridContent = function (_React$Component) {
|
|
|
6401
6401
|
{ href: linkHref },
|
|
6402
6402
|
React__default.createElement(
|
|
6403
6403
|
'a',
|
|
6404
|
-
{ className: index$$1 === 0 || index$$1 % 4 === 0 ? '' : 'card-image' },
|
|
6404
|
+
{ target: row.url && row.url.target ? '_blank' : '_self', className: index$$1 === 0 || index$$1 % 4 === 0 ? '' : 'card-image' },
|
|
6405
6405
|
React__default.createElement(
|
|
6406
6406
|
LazyLoad,
|
|
6407
6407
|
{ height: _this2.props.imageHeight },
|
|
@@ -6421,7 +6421,7 @@ var GridContent = function (_React$Component) {
|
|
|
6421
6421
|
{ href: linkHref },
|
|
6422
6422
|
React__default.createElement(
|
|
6423
6423
|
'a',
|
|
6424
|
-
|
|
6424
|
+
{ target: row.url && row.url.target ? '_blank' : '_self' },
|
|
6425
6425
|
React__default.createElement(
|
|
6426
6426
|
Card.Title,
|
|
6427
6427
|
null,
|
|
@@ -6748,11 +6748,11 @@ var DeckQueue = function (_React$Component) {
|
|
|
6748
6748
|
Card.Body,
|
|
6749
6749
|
{ style: { padding: '20px' } },
|
|
6750
6750
|
row.title && React__default.createElement(
|
|
6751
|
-
|
|
6752
|
-
|
|
6751
|
+
Card.Title,
|
|
6752
|
+
null,
|
|
6753
6753
|
React__default.createElement(
|
|
6754
|
-
|
|
6755
|
-
|
|
6754
|
+
Link,
|
|
6755
|
+
{ href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
|
|
6756
6756
|
row.title
|
|
6757
6757
|
)
|
|
6758
6758
|
),
|
|
@@ -6772,11 +6772,11 @@ var DeckQueue = function (_React$Component) {
|
|
|
6772
6772
|
)
|
|
6773
6773
|
),
|
|
6774
6774
|
row.summary && React__default.createElement(
|
|
6775
|
-
|
|
6776
|
-
|
|
6775
|
+
Card.Text,
|
|
6776
|
+
null,
|
|
6777
6777
|
React__default.createElement(
|
|
6778
|
-
|
|
6779
|
-
|
|
6778
|
+
Link,
|
|
6779
|
+
{ href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
|
|
6780
6780
|
row.summary
|
|
6781
6781
|
)
|
|
6782
6782
|
)
|
|
@@ -7541,6 +7541,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
7541
7541
|
reactBootstrap.Media,
|
|
7542
7542
|
{
|
|
7543
7543
|
key: article._id ? article._id : index$$1,
|
|
7544
|
+
className: article._type == 'feature' ? 'feature-media' : '',
|
|
7544
7545
|
style: { flexDirection: article._type == 'feature' ? 'column' : 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
7545
7546
|
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
7546
7547
|
Link,
|
|
@@ -7611,7 +7612,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
7611
7612
|
React__default.createElement(
|
|
7612
7613
|
'style',
|
|
7613
7614
|
{ jsx: 'true' },
|
|
7614
|
-
'\n .img-wrapper img {\n max-height: 240px;\n height: auto;\n width: 100%;\n object-fit: contain;\n }\n .feature-wrapper {\n width: 100%;\n }\n .feature-wrapper img {\n width: 100%;\n margin-bottom: 1em;\n }\n @media only screen and (min-width: 768px) {\n
|
|
7615
|
+
'\n .feature-media > .media-body {\n -webkit-box-flex: none;\n -ms-flex: none;\n flex: none;\n }\n .img-wrapper img {\n max-height: 240px;\n height: auto;\n width: 100%;\n object-fit: contain;\n }\n .feature-wrapper {\n width: 100%;\n }\n .feature-wrapper img {\n width: 100%;\n margin-bottom: 1em;\n }\n @media only screen and (min-width: 768px) {\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 '
|
|
7615
7616
|
)
|
|
7616
7617
|
);
|
|
7617
7618
|
};
|
|
@@ -10308,8 +10309,8 @@ var FigureComponent = function FigureComponent(_ref) {
|
|
|
10308
10309
|
|
|
10309
10310
|
var _useState = React.useState(null),
|
|
10310
10311
|
_useState2 = slicedToArray(_useState, 2),
|
|
10311
|
-
|
|
10312
|
-
|
|
10312
|
+
imageWidth = _useState2[0],
|
|
10313
|
+
setimageWidth = _useState2[1];
|
|
10313
10314
|
|
|
10314
10315
|
var _useState3 = React.useState(''),
|
|
10315
10316
|
_useState4 = slicedToArray(_useState3, 2),
|
|
@@ -10320,65 +10321,68 @@ var FigureComponent = function FigureComponent(_ref) {
|
|
|
10320
10321
|
alt = node$$1.alt,
|
|
10321
10322
|
blank = node$$1.blank,
|
|
10322
10323
|
link = node$$1.link,
|
|
10323
|
-
widthP = node$$1.widthP,
|
|
10324
|
+
_node$widthP = node$$1.widthP,
|
|
10325
|
+
widthP = _node$widthP === undefined ? 'auto' : _node$widthP,
|
|
10324
10326
|
_node$alignment = node$$1.alignment,
|
|
10325
10327
|
alignment = _node$alignment === undefined ? 'center' : _node$alignment;
|
|
10326
10328
|
|
|
10327
|
-
var imgWidth = widthP ? widthP + '%' : '100%';
|
|
10328
10329
|
|
|
10329
10330
|
var figureMargin = void 0;
|
|
10330
10331
|
if (imgFloat === 'none') {
|
|
10331
10332
|
figureMargin = '0 auto 1rem';
|
|
10332
10333
|
}
|
|
10333
10334
|
if (imgFloat === 'left') {
|
|
10334
|
-
figureMargin = '0 10%
|
|
10335
|
+
figureMargin = '0 1.5rem 1.5rem 10%';
|
|
10335
10336
|
}
|
|
10336
10337
|
if (imgFloat === 'right') {
|
|
10337
|
-
figureMargin = '0
|
|
10338
|
+
figureMargin = '0 10% 1.5rem 1.5rem';
|
|
10338
10339
|
}
|
|
10339
10340
|
|
|
10340
10341
|
var loadImg = function loadImg() {
|
|
10341
|
-
|
|
10342
|
+
if (widthP == 'auto') {
|
|
10343
|
+
setimageWidth(imgElement.current.naturalWidth);
|
|
10344
|
+
} else {
|
|
10345
|
+
setimageWidth(widthP + '%');
|
|
10346
|
+
}
|
|
10342
10347
|
};
|
|
10343
10348
|
|
|
10349
|
+
React.useEffect(function () {
|
|
10350
|
+
if (widthP == 'auto') {
|
|
10351
|
+
setimageWidth(imgElement.current.naturalWidth + 'px');
|
|
10352
|
+
} else {
|
|
10353
|
+
setimageWidth(widthP + '%');
|
|
10354
|
+
}
|
|
10355
|
+
}, [imageWidth]);
|
|
10356
|
+
|
|
10344
10357
|
React.useEffect(function () {
|
|
10345
10358
|
var screenWidth = window.innerWidth;
|
|
10346
10359
|
if (screenWidth > 1000) {
|
|
10347
10360
|
var align = alignment.toLowerCase() === 'center' ? 'none' : alignment.toLowerCase();
|
|
10348
10361
|
setimgFloat(align);
|
|
10349
10362
|
}
|
|
10363
|
+
|
|
10350
10364
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
10351
10365
|
}, []);
|
|
10352
10366
|
|
|
10353
10367
|
return React__default.createElement(
|
|
10354
10368
|
reactBootstrap.Figure,
|
|
10355
|
-
{ className: 'd-block text-center mb-3', style: { width:
|
|
10369
|
+
{ className: 'd-block text-center mb-3', style: { width: imageWidth, float: imgFloat, clear: 'both', margin: figureMargin, maxWidth: '100%' } },
|
|
10356
10370
|
link ? React__default.createElement(
|
|
10357
10371
|
'a',
|
|
10358
10372
|
{ href: link, target: blank ? '_blank' : '_self' },
|
|
10359
|
-
React__default.createElement(reactBootstrap.Figure.Image, {
|
|
10360
|
-
ref: imgElement,
|
|
10361
|
-
onLoad: loadImg,
|
|
10362
|
-
src: urlFor$1(node$$1, client).url(),
|
|
10363
|
-
alt: alt && alt
|
|
10364
|
-
}),
|
|
10373
|
+
React__default.createElement(reactBootstrap.Figure.Image, { style: { width: '100%' }, className: 'figure-image', ref: imgElement, onLoad: loadImg, src: urlFor$1(node$$1, client).url(), alt: alt && alt }),
|
|
10365
10374
|
caption && React__default.createElement(
|
|
10366
10375
|
reactBootstrap.Figure.Caption,
|
|
10367
|
-
{ style: { width:
|
|
10376
|
+
{ style: { width: '100%', maxWidth: '100%' } },
|
|
10368
10377
|
caption
|
|
10369
10378
|
)
|
|
10370
10379
|
) : React__default.createElement(
|
|
10371
10380
|
React__default.Fragment,
|
|
10372
10381
|
null,
|
|
10373
|
-
React__default.createElement(reactBootstrap.Figure.Image, {
|
|
10374
|
-
ref: imgElement,
|
|
10375
|
-
onLoad: loadImg,
|
|
10376
|
-
src: urlFor$1(node$$1, client).url(),
|
|
10377
|
-
alt: alt && alt
|
|
10378
|
-
}),
|
|
10382
|
+
React__default.createElement(reactBootstrap.Figure.Image, { style: { width: '100%' }, className: 'figure-image', ref: imgElement, onLoad: loadImg, src: urlFor$1(node$$1, client).url(), alt: alt && alt }),
|
|
10379
10383
|
caption && React__default.createElement(
|
|
10380
10384
|
reactBootstrap.Figure.Caption,
|
|
10381
|
-
{ style: { width:
|
|
10385
|
+
{ style: { width: '100%', maxWidth: '100%' } },
|
|
10382
10386
|
caption
|
|
10383
10387
|
)
|
|
10384
10388
|
)
|
|
@@ -14040,7 +14044,22 @@ var Media$1 = function Media$$1(_ref) {
|
|
|
14040
14044
|
|
|
14041
14045
|
var renderFigure = function renderFigure(uploadDoc, poster, blank, caption) {
|
|
14042
14046
|
if (uploadDoc && uploadDoc.asset) {
|
|
14043
|
-
if (poster && poster.asset) {
|
|
14047
|
+
if (poster && poster.asset && caption && caption !== '') {
|
|
14048
|
+
return React__default.createElement(
|
|
14049
|
+
reactBootstrap.Figure,
|
|
14050
|
+
{ className: 'mb-3' },
|
|
14051
|
+
React__default.createElement(
|
|
14052
|
+
'a',
|
|
14053
|
+
{ href: uploadDoc.asset.url, target: blank ? '_blank' : '_self' },
|
|
14054
|
+
React__default.createElement(reactBootstrap.Figure.Image, { src: urlFor(poster).url(), fluid: true }),
|
|
14055
|
+
React__default.createElement(
|
|
14056
|
+
reactBootstrap.Figure.Caption,
|
|
14057
|
+
{ className: 'text-center' },
|
|
14058
|
+
caption
|
|
14059
|
+
)
|
|
14060
|
+
)
|
|
14061
|
+
);
|
|
14062
|
+
} else if (poster && poster.asset) {
|
|
14044
14063
|
return React__default.createElement(
|
|
14045
14064
|
reactBootstrap.Figure,
|
|
14046
14065
|
{ className: 'mb-3' },
|
|
@@ -14083,11 +14102,27 @@ var Video = function Video(_ref) {
|
|
|
14083
14102
|
var node = _ref.node,
|
|
14084
14103
|
accountIDs = _ref.accountIDs;
|
|
14085
14104
|
var source = node.source,
|
|
14086
|
-
videoID = node.videoID
|
|
14105
|
+
videoID = node.videoID,
|
|
14106
|
+
experienceID = node.experienceID;
|
|
14087
14107
|
|
|
14088
14108
|
if (source === 'brightcove' && accountIDs.brightcove) {
|
|
14089
|
-
|
|
14109
|
+
if (videoID) {
|
|
14110
|
+
return React__default.createElement(ReactPlayerLoader, { accountId: accountIDs.brightcove.accountId, videoId: videoID, playerId: accountIDs.brightcove.playerId, attrs: { className: 'brightcove' } });
|
|
14111
|
+
} else if (experienceID) {
|
|
14112
|
+
return React__default.createElement('iframe', {
|
|
14113
|
+
src: 'https://players.brightcove.net/' + accountIDs.brightcove.accountId + '/experience_' + experienceID + '/index.html',
|
|
14114
|
+
allowFullScreen: 'true',
|
|
14115
|
+
webkitallowfullscreen: 'true',
|
|
14116
|
+
mozallowfullscreen: 'true',
|
|
14117
|
+
frameBorder: 'none',
|
|
14118
|
+
scrolling: 'no',
|
|
14119
|
+
height: '411',
|
|
14120
|
+
width: '100%'
|
|
14121
|
+
});
|
|
14122
|
+
}
|
|
14123
|
+
return null;
|
|
14090
14124
|
}
|
|
14125
|
+
|
|
14091
14126
|
// TODO - add players for other video types
|
|
14092
14127
|
return null;
|
|
14093
14128
|
};
|