@mjhls/mjh-framework 1.0.153 → 1.0.155
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 +2 -1
- package/dist/index.es.js +230 -36
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +229 -34
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var Media = _interopDefault(require('react-bootstrap/Media'));
|
|
|
20
20
|
var reactBootstrap = require('react-bootstrap');
|
|
21
21
|
var Button = _interopDefault(require('react-bootstrap/Button'));
|
|
22
22
|
var Badge = _interopDefault(require('react-bootstrap/Badge'));
|
|
23
|
+
var reactSocialIcons = require('react-social-icons');
|
|
23
24
|
var ListGroup = _interopDefault(require('react-bootstrap/ListGroup'));
|
|
24
25
|
var Head = _interopDefault(require('next/head'));
|
|
25
26
|
var Accordion = _interopDefault(require('react-bootstrap/Accordion'));
|
|
@@ -27,7 +28,6 @@ var AccordionToggle = require('react-bootstrap/AccordionToggle');
|
|
|
27
28
|
var reactShare = require('react-share');
|
|
28
29
|
var Form = _interopDefault(require('react-bootstrap/Form'));
|
|
29
30
|
var FormControl = _interopDefault(require('react-bootstrap/FormControl'));
|
|
30
|
-
var reactSocialIcons = require('react-social-icons');
|
|
31
31
|
var Nav = _interopDefault(require('react-bootstrap/Nav'));
|
|
32
32
|
var Navbar = _interopDefault(require('react-bootstrap/Navbar'));
|
|
33
33
|
var NavDropdown = _interopDefault(require('react-bootstrap/NavDropdown'));
|
|
@@ -7649,6 +7649,10 @@ var renderAuthor = function renderAuthor(authorDetail, index$$1, length) {
|
|
|
7649
7649
|
} else return null;
|
|
7650
7650
|
};
|
|
7651
7651
|
|
|
7652
|
+
var checkExternalUrl = function checkExternalUrl(url) {
|
|
7653
|
+
return new RegExp(['http', 'https'].join('|')).test(url);
|
|
7654
|
+
};
|
|
7655
|
+
|
|
7652
7656
|
var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router$$1, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems) {
|
|
7653
7657
|
var numberOfItemsBeforeAd = 6;
|
|
7654
7658
|
return React__default.createElement(
|
|
@@ -7657,6 +7661,169 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
7657
7661
|
data && data.map(function (article, index$$1) {
|
|
7658
7662
|
var pageNumber = article.pageNumber || values.page;
|
|
7659
7663
|
var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
|
|
7664
|
+
|
|
7665
|
+
if (article._type === 'feature') {
|
|
7666
|
+
if (article.blank || checkExternalUrl(article.url.current)) {
|
|
7667
|
+
return React__default.createElement(
|
|
7668
|
+
React__default.Fragment,
|
|
7669
|
+
{ key: article._id ? article._id : index$$1 },
|
|
7670
|
+
React__default.createElement(
|
|
7671
|
+
VisibilitySensor,
|
|
7672
|
+
{
|
|
7673
|
+
key: article._id ? article._id : index$$1,
|
|
7674
|
+
onChange: function onChange(isVisible) {
|
|
7675
|
+
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router$$1, currentPage, setCurrentPage);
|
|
7676
|
+
} },
|
|
7677
|
+
React__default.createElement(
|
|
7678
|
+
React__default.Fragment,
|
|
7679
|
+
null,
|
|
7680
|
+
React__default.createElement(
|
|
7681
|
+
reactBootstrap.Media,
|
|
7682
|
+
{
|
|
7683
|
+
key: article._id ? article._id : index$$1,
|
|
7684
|
+
className: 'feature-media',
|
|
7685
|
+
style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
7686
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
7687
|
+
'a',
|
|
7688
|
+
{ href: article.url.current, target: '_blank', className: 'feature-wrapper' },
|
|
7689
|
+
React__default.createElement(
|
|
7690
|
+
LazyLoad,
|
|
7691
|
+
{ height: imageHeight },
|
|
7692
|
+
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: '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 })
|
|
7693
|
+
)
|
|
7694
|
+
),
|
|
7695
|
+
React__default.createElement(
|
|
7696
|
+
reactBootstrap.Media.Body,
|
|
7697
|
+
null,
|
|
7698
|
+
React__default.createElement(
|
|
7699
|
+
Link,
|
|
7700
|
+
{ href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
7701
|
+
React__default.createElement(
|
|
7702
|
+
'a',
|
|
7703
|
+
null,
|
|
7704
|
+
article.title && React__default.createElement(
|
|
7705
|
+
'h4',
|
|
7706
|
+
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
7707
|
+
article.title
|
|
7708
|
+
)
|
|
7709
|
+
)
|
|
7710
|
+
),
|
|
7711
|
+
showPublished && article.published && React__default.createElement(
|
|
7712
|
+
'p',
|
|
7713
|
+
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
7714
|
+
moment(article.published).format('MMMM DD, YYYY')
|
|
7715
|
+
),
|
|
7716
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index$$1) {
|
|
7717
|
+
return renderAuthor(authorDetail, index$$1, article.authorMapping.length);
|
|
7718
|
+
}),
|
|
7719
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
7720
|
+
'p',
|
|
7721
|
+
{
|
|
7722
|
+
style: {
|
|
7723
|
+
background: 'var(--highlight)',
|
|
7724
|
+
color: 'var(--highlight-accent)',
|
|
7725
|
+
marginBottom: '.25rem',
|
|
7726
|
+
display: 'inline-block',
|
|
7727
|
+
padding: '0 .25rem',
|
|
7728
|
+
fontSize: '.8rem'
|
|
7729
|
+
} },
|
|
7730
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
7731
|
+
),
|
|
7732
|
+
article.summary && React__default.createElement(
|
|
7733
|
+
'p',
|
|
7734
|
+
{ className: 'pt-2 card-text' },
|
|
7735
|
+
article.summary
|
|
7736
|
+
)
|
|
7737
|
+
)
|
|
7738
|
+
)
|
|
7739
|
+
)
|
|
7740
|
+
),
|
|
7741
|
+
main_36 && rightItems && (index$$1 + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index$$1, numberOfItemsBeforeAd, rightItems)
|
|
7742
|
+
);
|
|
7743
|
+
} else {
|
|
7744
|
+
return React__default.createElement(
|
|
7745
|
+
React__default.Fragment,
|
|
7746
|
+
{ key: article._id ? article._id : index$$1 },
|
|
7747
|
+
React__default.createElement(
|
|
7748
|
+
VisibilitySensor,
|
|
7749
|
+
{
|
|
7750
|
+
key: article._id ? article._id : index$$1,
|
|
7751
|
+
onChange: function onChange(isVisible) {
|
|
7752
|
+
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router$$1, currentPage, setCurrentPage);
|
|
7753
|
+
} },
|
|
7754
|
+
React__default.createElement(
|
|
7755
|
+
React__default.Fragment,
|
|
7756
|
+
null,
|
|
7757
|
+
React__default.createElement(
|
|
7758
|
+
reactBootstrap.Media,
|
|
7759
|
+
{
|
|
7760
|
+
key: article._id ? article._id : index$$1,
|
|
7761
|
+
className: 'feature-media',
|
|
7762
|
+
style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
7763
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
7764
|
+
Link,
|
|
7765
|
+
{ href: article.url.current, as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
7766
|
+
React__default.createElement(
|
|
7767
|
+
'a',
|
|
7768
|
+
{ className: 'feature-wrapper' },
|
|
7769
|
+
React__default.createElement(
|
|
7770
|
+
LazyLoad,
|
|
7771
|
+
{ height: imageHeight },
|
|
7772
|
+
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: '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 })
|
|
7773
|
+
)
|
|
7774
|
+
)
|
|
7775
|
+
),
|
|
7776
|
+
React__default.createElement(
|
|
7777
|
+
reactBootstrap.Media.Body,
|
|
7778
|
+
null,
|
|
7779
|
+
React__default.createElement(
|
|
7780
|
+
Link,
|
|
7781
|
+
{ href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
7782
|
+
React__default.createElement(
|
|
7783
|
+
'a',
|
|
7784
|
+
null,
|
|
7785
|
+
article.title && React__default.createElement(
|
|
7786
|
+
'h4',
|
|
7787
|
+
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
7788
|
+
article.title
|
|
7789
|
+
)
|
|
7790
|
+
)
|
|
7791
|
+
),
|
|
7792
|
+
showPublished && article.published && React__default.createElement(
|
|
7793
|
+
'p',
|
|
7794
|
+
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
7795
|
+
moment(article.published).format('MMMM DD, YYYY')
|
|
7796
|
+
),
|
|
7797
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index$$1) {
|
|
7798
|
+
return renderAuthor(authorDetail, index$$1, article.authorMapping.length);
|
|
7799
|
+
}),
|
|
7800
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
7801
|
+
'p',
|
|
7802
|
+
{
|
|
7803
|
+
style: {
|
|
7804
|
+
background: 'var(--highlight)',
|
|
7805
|
+
color: 'var(--highlight-accent)',
|
|
7806
|
+
marginBottom: '.25rem',
|
|
7807
|
+
display: 'inline-block',
|
|
7808
|
+
padding: '0 .25rem',
|
|
7809
|
+
fontSize: '.8rem'
|
|
7810
|
+
} },
|
|
7811
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
7812
|
+
),
|
|
7813
|
+
article.summary && React__default.createElement(
|
|
7814
|
+
'p',
|
|
7815
|
+
{ className: 'pt-2 card-text' },
|
|
7816
|
+
article.summary
|
|
7817
|
+
)
|
|
7818
|
+
)
|
|
7819
|
+
)
|
|
7820
|
+
)
|
|
7821
|
+
),
|
|
7822
|
+
main_36 && rightItems && (index$$1 + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index$$1, numberOfItemsBeforeAd, rightItems)
|
|
7823
|
+
);
|
|
7824
|
+
}
|
|
7825
|
+
}
|
|
7826
|
+
|
|
7660
7827
|
return React__default.createElement(
|
|
7661
7828
|
React__default.Fragment,
|
|
7662
7829
|
{ key: article._id ? article._id : index$$1 },
|
|
@@ -7674,22 +7841,17 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
7674
7841
|
reactBootstrap.Media,
|
|
7675
7842
|
{
|
|
7676
7843
|
key: article._id ? article._id : index$$1,
|
|
7677
|
-
|
|
7678
|
-
style: { flexDirection: article._type == 'feature' ? 'column' : 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
7844
|
+
style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
7679
7845
|
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
7680
7846
|
Link,
|
|
7681
7847
|
{ href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
7682
7848
|
React__default.createElement(
|
|
7683
7849
|
'a',
|
|
7684
|
-
{ className:
|
|
7850
|
+
{ className: 'img-wrapper' },
|
|
7685
7851
|
React__default.createElement(
|
|
7686
7852
|
LazyLoad,
|
|
7687
7853
|
{ height: imageHeight },
|
|
7688
|
-
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', {
|
|
7689
|
-
className: article._type == 'feature' ? 'img-fluid' : 'mr-3 img-fluid',
|
|
7690
|
-
src: renderCardImage(article, builder, imageHeight, imageWidth),
|
|
7691
|
-
alt: article.title
|
|
7692
|
-
}) : 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 })
|
|
7854
|
+
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 })
|
|
7693
7855
|
)
|
|
7694
7856
|
)
|
|
7695
7857
|
),
|
|
@@ -8855,46 +9017,78 @@ var Column1 = function Column1(props) {
|
|
|
8855
9017
|
};
|
|
8856
9018
|
|
|
8857
9019
|
var SideFooter = function SideFooter(props) {
|
|
9020
|
+
/*
|
|
9021
|
+
useage example: <SideFooter cache={props.cache} logo='/an_mjhls_brand_logo.png' />
|
|
9022
|
+
*/
|
|
9023
|
+
var _props$cache$siteSett = props.cache.siteSettingCache,
|
|
9024
|
+
socialLinks = _props$cache$siteSett.socialLinks,
|
|
9025
|
+
footerLinks = _props$cache$siteSett.footerLinks,
|
|
9026
|
+
name = _props$cache$siteSett.name;
|
|
9027
|
+
var logo = props.logo;
|
|
9028
|
+
|
|
8858
9029
|
var year = new Date().getFullYear();
|
|
8859
|
-
var website = props.website;
|
|
8860
9030
|
|
|
8861
9031
|
return React__default.createElement(
|
|
8862
9032
|
'div',
|
|
8863
9033
|
{ className: 'side-footer' },
|
|
8864
|
-
|
|
9034
|
+
React__default.createElement(
|
|
8865
9035
|
'ul',
|
|
8866
9036
|
null,
|
|
8867
|
-
|
|
8868
|
-
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
'a',
|
|
8873
|
-
{ target: '_blank', href: content.url },
|
|
8874
|
-
content.title
|
|
8875
|
-
)
|
|
8876
|
-
) : React__default.createElement(
|
|
8877
|
-
'li',
|
|
8878
|
-
{ key: index },
|
|
8879
|
-
React__default.createElement(
|
|
8880
|
-
Link,
|
|
8881
|
-
{ href: content.url },
|
|
9037
|
+
footerLinks && footerLinks.map(function (row, index) {
|
|
9038
|
+
if (row.blank) {
|
|
9039
|
+
return React__default.createElement(
|
|
9040
|
+
'li',
|
|
9041
|
+
{ key: index },
|
|
8882
9042
|
React__default.createElement(
|
|
8883
9043
|
'a',
|
|
8884
|
-
|
|
8885
|
-
|
|
9044
|
+
{ href: row.url, target: '_blank' },
|
|
9045
|
+
row.title
|
|
8886
9046
|
)
|
|
8887
|
-
)
|
|
8888
|
-
|
|
8889
|
-
|
|
9047
|
+
);
|
|
9048
|
+
} else {
|
|
9049
|
+
return React__default.createElement(
|
|
9050
|
+
'li',
|
|
9051
|
+
{ key: index },
|
|
9052
|
+
React__default.createElement(
|
|
9053
|
+
Link,
|
|
9054
|
+
{ href: row.url },
|
|
9055
|
+
React__default.createElement(
|
|
9056
|
+
'a',
|
|
9057
|
+
null,
|
|
9058
|
+
row.title
|
|
9059
|
+
)
|
|
9060
|
+
)
|
|
9061
|
+
);
|
|
9062
|
+
}
|
|
9063
|
+
}),
|
|
9064
|
+
React__default.createElement(
|
|
9065
|
+
'li',
|
|
9066
|
+
{ style: { marginTop: '10px' } },
|
|
9067
|
+
socialLinks && socialLinks.map(function (row, index) {
|
|
9068
|
+
return React__default.createElement(reactSocialIcons.SocialIcon, { key: index, index: index, url: row.url, style: { width: 30, height: 30, marginRight: 5 } });
|
|
9069
|
+
})
|
|
9070
|
+
)
|
|
8890
9071
|
),
|
|
8891
|
-
|
|
9072
|
+
logo && React__default.createElement(
|
|
9073
|
+
'ul',
|
|
9074
|
+
null,
|
|
9075
|
+
React__default.createElement(
|
|
9076
|
+
'li',
|
|
9077
|
+
{ className: 'pt-2' },
|
|
9078
|
+
React__default.createElement(
|
|
9079
|
+
'a',
|
|
9080
|
+
{ href: 'https://www.mjhlifesciences.com' },
|
|
9081
|
+
React__default.createElement('img', { style: { maxWidth: '100%' }, alt: 'MJHLS Brand Logo', src: logo })
|
|
9082
|
+
)
|
|
9083
|
+
)
|
|
9084
|
+
),
|
|
9085
|
+
React__default.createElement(
|
|
8892
9086
|
'p',
|
|
8893
9087
|
null,
|
|
8894
9088
|
'\xA9 ',
|
|
8895
9089
|
year,
|
|
8896
|
-
' ',
|
|
8897
|
-
|
|
9090
|
+
' MJH Life Sciences and ',
|
|
9091
|
+
name,
|
|
8898
9092
|
'. All rights reserved.'
|
|
8899
9093
|
)
|
|
8900
9094
|
);
|
|
@@ -15811,4 +16005,5 @@ exports.AlphabeticList = AlphabeticList;
|
|
|
15811
16005
|
exports.PdfDownload = PdfDownload;
|
|
15812
16006
|
exports.RelatedTopicsDropdown = RelatedTopicsDropdown;
|
|
15813
16007
|
exports.Ustream = Ustream;
|
|
16008
|
+
exports.SideFooter = SideFooter;
|
|
15814
16009
|
//# sourceMappingURL=index.js.map
|