@mjhls/mjh-framework 1.0.142 → 1.0.144
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 +80 -44
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +80 -44
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -6331,13 +6331,13 @@ var GridContent = function (_React$Component) {
|
|
|
6331
6331
|
Card.Body,
|
|
6332
6332
|
{ style: { padding: '20px' } },
|
|
6333
6333
|
React__default.createElement(
|
|
6334
|
-
|
|
6335
|
-
|
|
6334
|
+
Card.Title,
|
|
6335
|
+
null,
|
|
6336
6336
|
React__default.createElement(
|
|
6337
|
-
|
|
6338
|
-
|
|
6337
|
+
Link,
|
|
6338
|
+
{ href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
|
|
6339
6339
|
React__default.createElement(
|
|
6340
|
-
|
|
6340
|
+
'a',
|
|
6341
6341
|
null,
|
|
6342
6342
|
row.title
|
|
6343
6343
|
)
|
|
@@ -6394,7 +6394,7 @@ var GridContent = function (_React$Component) {
|
|
|
6394
6394
|
{ href: linkHref },
|
|
6395
6395
|
React__default.createElement(
|
|
6396
6396
|
'a',
|
|
6397
|
-
{ className: index$$1 === 0 || index$$1 % 4 === 0 ? '' : 'card-image' },
|
|
6397
|
+
{ target: row.url && row.url.target ? '_blank' : '_self', className: index$$1 === 0 || index$$1 % 4 === 0 ? '' : 'card-image' },
|
|
6398
6398
|
React__default.createElement(
|
|
6399
6399
|
LazyLoad,
|
|
6400
6400
|
{ height: _this2.props.imageHeight },
|
|
@@ -6414,7 +6414,7 @@ var GridContent = function (_React$Component) {
|
|
|
6414
6414
|
{ href: linkHref },
|
|
6415
6415
|
React__default.createElement(
|
|
6416
6416
|
'a',
|
|
6417
|
-
|
|
6417
|
+
{ target: row.url && row.url.target ? '_blank' : '_self' },
|
|
6418
6418
|
React__default.createElement(
|
|
6419
6419
|
Card.Title,
|
|
6420
6420
|
null,
|
|
@@ -6741,11 +6741,11 @@ var DeckQueue = function (_React$Component) {
|
|
|
6741
6741
|
Card.Body,
|
|
6742
6742
|
{ style: { padding: '20px' } },
|
|
6743
6743
|
row.title && React__default.createElement(
|
|
6744
|
-
|
|
6745
|
-
|
|
6744
|
+
Card.Title,
|
|
6745
|
+
null,
|
|
6746
6746
|
React__default.createElement(
|
|
6747
|
-
|
|
6748
|
-
|
|
6747
|
+
Link,
|
|
6748
|
+
{ href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
|
|
6749
6749
|
row.title
|
|
6750
6750
|
)
|
|
6751
6751
|
),
|
|
@@ -6765,11 +6765,11 @@ var DeckQueue = function (_React$Component) {
|
|
|
6765
6765
|
)
|
|
6766
6766
|
),
|
|
6767
6767
|
row.summary && React__default.createElement(
|
|
6768
|
-
|
|
6769
|
-
|
|
6768
|
+
Card.Text,
|
|
6769
|
+
null,
|
|
6770
6770
|
React__default.createElement(
|
|
6771
|
-
|
|
6772
|
-
|
|
6771
|
+
Link,
|
|
6772
|
+
{ href: _this2.page + '/[url]', as: _this2.page + '/' + get_1(row, 'url.current') },
|
|
6773
6773
|
row.summary
|
|
6774
6774
|
)
|
|
6775
6775
|
)
|
|
@@ -7534,6 +7534,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
7534
7534
|
Media$1,
|
|
7535
7535
|
{
|
|
7536
7536
|
key: article._id ? article._id : index$$1,
|
|
7537
|
+
className: article._type == 'feature' ? 'feature-media' : '',
|
|
7537
7538
|
style: { flexDirection: article._type == 'feature' ? 'column' : 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
7538
7539
|
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
7539
7540
|
Link,
|
|
@@ -7604,7 +7605,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
7604
7605
|
React__default.createElement(
|
|
7605
7606
|
'style',
|
|
7606
7607
|
{ jsx: 'true' },
|
|
7607
|
-
'\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
|
|
7608
|
+
'\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 '
|
|
7608
7609
|
)
|
|
7609
7610
|
);
|
|
7610
7611
|
};
|
|
@@ -8806,7 +8807,7 @@ var Column2 = function Column2(props) {
|
|
|
8806
8807
|
row.component
|
|
8807
8808
|
);
|
|
8808
8809
|
}),
|
|
8809
|
-
website && website.sideFooterContent && website.sideFooterContent.length && React__default.createElement(SideFooter, { website: website })
|
|
8810
|
+
website && website.sideFooterContent && website.sideFooterContent.length && !website.showFooterOnLeftSide && React__default.createElement(SideFooter, { website: website })
|
|
8810
8811
|
)
|
|
8811
8812
|
)
|
|
8812
8813
|
)
|
|
@@ -8962,7 +8963,8 @@ var Column3 = function Column3(props) {
|
|
|
8962
8963
|
React__default.createElement(
|
|
8963
8964
|
Col,
|
|
8964
8965
|
{ md: true, className: 'leftCol', style: { width: '200px' } },
|
|
8965
|
-
React__default.createElement(LeftNav, { leftItems: leftItems })
|
|
8966
|
+
React__default.createElement(LeftNav, { leftItems: leftItems }),
|
|
8967
|
+
website && website.sideFooterContent && website.sideFooterContent.length && website.showFooterOnLeftSide && React__default.createElement(SideFooter, { website: website })
|
|
8966
8968
|
),
|
|
8967
8969
|
React__default.createElement(
|
|
8968
8970
|
Col,
|
|
@@ -9006,7 +9008,7 @@ var Column3 = function Column3(props) {
|
|
|
9006
9008
|
row.component
|
|
9007
9009
|
);
|
|
9008
9010
|
}),
|
|
9009
|
-
website && website.sideFooterContent && website.sideFooterContent.length && React__default.createElement(SideFooter, { website: website })
|
|
9011
|
+
website && website.sideFooterContent && website.sideFooterContent.length && !website.showFooterOnLeftSide && React__default.createElement(SideFooter, { website: website })
|
|
9010
9012
|
)
|
|
9011
9013
|
)
|
|
9012
9014
|
)
|
|
@@ -10301,8 +10303,8 @@ var FigureComponent = function FigureComponent(_ref) {
|
|
|
10301
10303
|
|
|
10302
10304
|
var _useState = useState(null),
|
|
10303
10305
|
_useState2 = slicedToArray(_useState, 2),
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
+
imageWidth = _useState2[0],
|
|
10307
|
+
setimageWidth = _useState2[1];
|
|
10306
10308
|
|
|
10307
10309
|
var _useState3 = useState(''),
|
|
10308
10310
|
_useState4 = slicedToArray(_useState3, 2),
|
|
@@ -10313,65 +10315,68 @@ var FigureComponent = function FigureComponent(_ref) {
|
|
|
10313
10315
|
alt = node$$1.alt,
|
|
10314
10316
|
blank = node$$1.blank,
|
|
10315
10317
|
link = node$$1.link,
|
|
10316
|
-
widthP = node$$1.widthP,
|
|
10318
|
+
_node$widthP = node$$1.widthP,
|
|
10319
|
+
widthP = _node$widthP === undefined ? 'auto' : _node$widthP,
|
|
10317
10320
|
_node$alignment = node$$1.alignment,
|
|
10318
10321
|
alignment = _node$alignment === undefined ? 'center' : _node$alignment;
|
|
10319
10322
|
|
|
10320
|
-
var imgWidth = widthP ? widthP + '%' : '100%';
|
|
10321
10323
|
|
|
10322
10324
|
var figureMargin = void 0;
|
|
10323
10325
|
if (imgFloat === 'none') {
|
|
10324
10326
|
figureMargin = '0 auto 1rem';
|
|
10325
10327
|
}
|
|
10326
10328
|
if (imgFloat === 'left') {
|
|
10327
|
-
figureMargin = '0 10%
|
|
10329
|
+
figureMargin = '0 1.5rem 1.5rem 10%';
|
|
10328
10330
|
}
|
|
10329
10331
|
if (imgFloat === 'right') {
|
|
10330
|
-
figureMargin = '0
|
|
10332
|
+
figureMargin = '0 10% 1.5rem 1.5rem';
|
|
10331
10333
|
}
|
|
10332
10334
|
|
|
10333
10335
|
var loadImg = function loadImg() {
|
|
10334
|
-
|
|
10336
|
+
if (widthP == 'auto') {
|
|
10337
|
+
setimageWidth(imgElement.current.naturalWidth);
|
|
10338
|
+
} else {
|
|
10339
|
+
setimageWidth(widthP + '%');
|
|
10340
|
+
}
|
|
10335
10341
|
};
|
|
10336
10342
|
|
|
10343
|
+
useEffect(function () {
|
|
10344
|
+
if (widthP == 'auto') {
|
|
10345
|
+
setimageWidth(imgElement.current.naturalWidth + 'px');
|
|
10346
|
+
} else {
|
|
10347
|
+
setimageWidth(widthP + '%');
|
|
10348
|
+
}
|
|
10349
|
+
}, [imageWidth]);
|
|
10350
|
+
|
|
10337
10351
|
useEffect(function () {
|
|
10338
10352
|
var screenWidth = window.innerWidth;
|
|
10339
10353
|
if (screenWidth > 1000) {
|
|
10340
10354
|
var align = alignment.toLowerCase() === 'center' ? 'none' : alignment.toLowerCase();
|
|
10341
10355
|
setimgFloat(align);
|
|
10342
10356
|
}
|
|
10357
|
+
|
|
10343
10358
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
10344
10359
|
}, []);
|
|
10345
10360
|
|
|
10346
10361
|
return React__default.createElement(
|
|
10347
10362
|
Figure,
|
|
10348
|
-
{ className: 'd-block text-center mb-3', style: { width:
|
|
10363
|
+
{ className: 'd-block text-center mb-3', style: { width: imageWidth, float: imgFloat, clear: 'both', margin: figureMargin, maxWidth: '100%' } },
|
|
10349
10364
|
link ? React__default.createElement(
|
|
10350
10365
|
'a',
|
|
10351
10366
|
{ href: link, target: blank ? '_blank' : '_self' },
|
|
10352
|
-
React__default.createElement(Figure.Image, {
|
|
10353
|
-
ref: imgElement,
|
|
10354
|
-
onLoad: loadImg,
|
|
10355
|
-
src: urlFor$1(node$$1, client).url(),
|
|
10356
|
-
alt: alt && alt
|
|
10357
|
-
}),
|
|
10367
|
+
React__default.createElement(Figure.Image, { style: { width: '100%' }, className: 'figure-image', ref: imgElement, onLoad: loadImg, src: urlFor$1(node$$1, client).url(), alt: alt && alt }),
|
|
10358
10368
|
caption && React__default.createElement(
|
|
10359
10369
|
Figure.Caption,
|
|
10360
|
-
{ style: { width:
|
|
10370
|
+
{ style: { width: '100%', maxWidth: '100%' } },
|
|
10361
10371
|
caption
|
|
10362
10372
|
)
|
|
10363
10373
|
) : React__default.createElement(
|
|
10364
10374
|
React__default.Fragment,
|
|
10365
10375
|
null,
|
|
10366
|
-
React__default.createElement(Figure.Image, {
|
|
10367
|
-
ref: imgElement,
|
|
10368
|
-
onLoad: loadImg,
|
|
10369
|
-
src: urlFor$1(node$$1, client).url(),
|
|
10370
|
-
alt: alt && alt
|
|
10371
|
-
}),
|
|
10376
|
+
React__default.createElement(Figure.Image, { style: { width: '100%' }, className: 'figure-image', ref: imgElement, onLoad: loadImg, src: urlFor$1(node$$1, client).url(), alt: alt && alt }),
|
|
10372
10377
|
caption && React__default.createElement(
|
|
10373
10378
|
Figure.Caption,
|
|
10374
|
-
{ style: { width:
|
|
10379
|
+
{ style: { width: '100%', maxWidth: '100%' } },
|
|
10375
10380
|
caption
|
|
10376
10381
|
)
|
|
10377
10382
|
)
|
|
@@ -14033,7 +14038,22 @@ var Media$2 = function Media$$1(_ref) {
|
|
|
14033
14038
|
|
|
14034
14039
|
var renderFigure = function renderFigure(uploadDoc, poster, blank, caption) {
|
|
14035
14040
|
if (uploadDoc && uploadDoc.asset) {
|
|
14036
|
-
if (poster && poster.asset) {
|
|
14041
|
+
if (poster && poster.asset && caption && caption !== '') {
|
|
14042
|
+
return React__default.createElement(
|
|
14043
|
+
Figure,
|
|
14044
|
+
{ className: 'mb-3' },
|
|
14045
|
+
React__default.createElement(
|
|
14046
|
+
'a',
|
|
14047
|
+
{ href: uploadDoc.asset.url, target: blank ? '_blank' : '_self' },
|
|
14048
|
+
React__default.createElement(Figure.Image, { src: urlFor(poster).url(), fluid: true }),
|
|
14049
|
+
React__default.createElement(
|
|
14050
|
+
Figure.Caption,
|
|
14051
|
+
{ className: 'text-center' },
|
|
14052
|
+
caption
|
|
14053
|
+
)
|
|
14054
|
+
)
|
|
14055
|
+
);
|
|
14056
|
+
} else if (poster && poster.asset) {
|
|
14037
14057
|
return React__default.createElement(
|
|
14038
14058
|
Figure,
|
|
14039
14059
|
{ className: 'mb-3' },
|
|
@@ -14076,11 +14096,27 @@ var Video = function Video(_ref) {
|
|
|
14076
14096
|
var node = _ref.node,
|
|
14077
14097
|
accountIDs = _ref.accountIDs;
|
|
14078
14098
|
var source = node.source,
|
|
14079
|
-
videoID = node.videoID
|
|
14099
|
+
videoID = node.videoID,
|
|
14100
|
+
experienceID = node.experienceID;
|
|
14080
14101
|
|
|
14081
14102
|
if (source === 'brightcove' && accountIDs.brightcove) {
|
|
14082
|
-
|
|
14103
|
+
if (videoID) {
|
|
14104
|
+
return React__default.createElement(ReactPlayerLoader, { accountId: accountIDs.brightcove.accountId, videoId: videoID, playerId: accountIDs.brightcove.playerId, attrs: { className: 'brightcove' } });
|
|
14105
|
+
} else if (experienceID) {
|
|
14106
|
+
return React__default.createElement('iframe', {
|
|
14107
|
+
src: 'https://players.brightcove.net/' + accountIDs.brightcove.accountId + '/experience_' + experienceID + '/index.html',
|
|
14108
|
+
allowFullScreen: 'true',
|
|
14109
|
+
webkitallowfullscreen: 'true',
|
|
14110
|
+
mozallowfullscreen: 'true',
|
|
14111
|
+
frameBorder: 'none',
|
|
14112
|
+
scrolling: 'no',
|
|
14113
|
+
height: '411',
|
|
14114
|
+
width: '100%'
|
|
14115
|
+
});
|
|
14116
|
+
}
|
|
14117
|
+
return null;
|
|
14083
14118
|
}
|
|
14119
|
+
|
|
14084
14120
|
// TODO - add players for other video types
|
|
14085
14121
|
return null;
|
|
14086
14122
|
};
|