@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/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, createContext, createElement } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import reactDom from 'react-dom';
|
|
4
4
|
import Container from 'react-bootstrap/Container';
|
|
@@ -13,6 +13,7 @@ import Media from 'react-bootstrap/Media';
|
|
|
13
13
|
import { Media as Media$1, Container as Container$1, Dropdown, Figure, Carousel, Table, Button as Button$1, ProgressBar, Card as Card$1 } from 'react-bootstrap';
|
|
14
14
|
import Button from 'react-bootstrap/Button';
|
|
15
15
|
import Badge from 'react-bootstrap/Badge';
|
|
16
|
+
import { SocialIcon } from 'react-social-icons';
|
|
16
17
|
import ListGroup from 'react-bootstrap/ListGroup';
|
|
17
18
|
import Head from 'next/head';
|
|
18
19
|
import Accordion from 'react-bootstrap/Accordion';
|
|
@@ -20,7 +21,6 @@ import { useAccordionToggle } from 'react-bootstrap/AccordionToggle';
|
|
|
20
21
|
import { FacebookShareButton, TwitterShareButton, PinterestShareButton, EmailShareButton, FacebookIcon, TwitterIcon, PinterestIcon, EmailIcon } from 'react-share';
|
|
21
22
|
import Form from 'react-bootstrap/Form';
|
|
22
23
|
import FormControl from 'react-bootstrap/FormControl';
|
|
23
|
-
import { SocialIcon } from 'react-social-icons';
|
|
24
24
|
import Nav from 'react-bootstrap/Nav';
|
|
25
25
|
import Navbar from 'react-bootstrap/Navbar';
|
|
26
26
|
import NavDropdown from 'react-bootstrap/NavDropdown';
|
|
@@ -7642,6 +7642,10 @@ var renderAuthor = function renderAuthor(authorDetail, index$$1, length) {
|
|
|
7642
7642
|
} else return null;
|
|
7643
7643
|
};
|
|
7644
7644
|
|
|
7645
|
+
var checkExternalUrl = function checkExternalUrl(url) {
|
|
7646
|
+
return new RegExp(['http', 'https'].join('|')).test(url);
|
|
7647
|
+
};
|
|
7648
|
+
|
|
7645
7649
|
var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems) {
|
|
7646
7650
|
var numberOfItemsBeforeAd = 6;
|
|
7647
7651
|
return React__default.createElement(
|
|
@@ -7650,6 +7654,169 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
7650
7654
|
data && data.map(function (article, index$$1) {
|
|
7651
7655
|
var pageNumber = article.pageNumber || values.page;
|
|
7652
7656
|
var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
|
|
7657
|
+
|
|
7658
|
+
if (article._type === 'feature') {
|
|
7659
|
+
if (article.blank || checkExternalUrl(article.url.current)) {
|
|
7660
|
+
return React__default.createElement(
|
|
7661
|
+
React__default.Fragment,
|
|
7662
|
+
{ key: article._id ? article._id : index$$1 },
|
|
7663
|
+
React__default.createElement(
|
|
7664
|
+
VisibilitySensor,
|
|
7665
|
+
{
|
|
7666
|
+
key: article._id ? article._id : index$$1,
|
|
7667
|
+
onChange: function onChange(isVisible) {
|
|
7668
|
+
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
|
|
7669
|
+
} },
|
|
7670
|
+
React__default.createElement(
|
|
7671
|
+
React__default.Fragment,
|
|
7672
|
+
null,
|
|
7673
|
+
React__default.createElement(
|
|
7674
|
+
Media$1,
|
|
7675
|
+
{
|
|
7676
|
+
key: article._id ? article._id : index$$1,
|
|
7677
|
+
className: 'feature-media',
|
|
7678
|
+
style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
7679
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
7680
|
+
'a',
|
|
7681
|
+
{ href: article.url.current, target: '_blank', className: 'feature-wrapper' },
|
|
7682
|
+
React__default.createElement(
|
|
7683
|
+
LazyLoad,
|
|
7684
|
+
{ height: imageHeight },
|
|
7685
|
+
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 })
|
|
7686
|
+
)
|
|
7687
|
+
),
|
|
7688
|
+
React__default.createElement(
|
|
7689
|
+
Media$1.Body,
|
|
7690
|
+
null,
|
|
7691
|
+
React__default.createElement(
|
|
7692
|
+
Link,
|
|
7693
|
+
{ href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
7694
|
+
React__default.createElement(
|
|
7695
|
+
'a',
|
|
7696
|
+
null,
|
|
7697
|
+
article.title && React__default.createElement(
|
|
7698
|
+
'h4',
|
|
7699
|
+
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
7700
|
+
article.title
|
|
7701
|
+
)
|
|
7702
|
+
)
|
|
7703
|
+
),
|
|
7704
|
+
showPublished && article.published && React__default.createElement(
|
|
7705
|
+
'p',
|
|
7706
|
+
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
7707
|
+
moment(article.published).format('MMMM DD, YYYY')
|
|
7708
|
+
),
|
|
7709
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index$$1) {
|
|
7710
|
+
return renderAuthor(authorDetail, index$$1, article.authorMapping.length);
|
|
7711
|
+
}),
|
|
7712
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
7713
|
+
'p',
|
|
7714
|
+
{
|
|
7715
|
+
style: {
|
|
7716
|
+
background: 'var(--highlight)',
|
|
7717
|
+
color: 'var(--highlight-accent)',
|
|
7718
|
+
marginBottom: '.25rem',
|
|
7719
|
+
display: 'inline-block',
|
|
7720
|
+
padding: '0 .25rem',
|
|
7721
|
+
fontSize: '.8rem'
|
|
7722
|
+
} },
|
|
7723
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
7724
|
+
),
|
|
7725
|
+
article.summary && React__default.createElement(
|
|
7726
|
+
'p',
|
|
7727
|
+
{ className: 'pt-2 card-text' },
|
|
7728
|
+
article.summary
|
|
7729
|
+
)
|
|
7730
|
+
)
|
|
7731
|
+
)
|
|
7732
|
+
)
|
|
7733
|
+
),
|
|
7734
|
+
main_36 && rightItems && (index$$1 + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index$$1, numberOfItemsBeforeAd, rightItems)
|
|
7735
|
+
);
|
|
7736
|
+
} else {
|
|
7737
|
+
return React__default.createElement(
|
|
7738
|
+
React__default.Fragment,
|
|
7739
|
+
{ key: article._id ? article._id : index$$1 },
|
|
7740
|
+
React__default.createElement(
|
|
7741
|
+
VisibilitySensor,
|
|
7742
|
+
{
|
|
7743
|
+
key: article._id ? article._id : index$$1,
|
|
7744
|
+
onChange: function onChange(isVisible) {
|
|
7745
|
+
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
|
|
7746
|
+
} },
|
|
7747
|
+
React__default.createElement(
|
|
7748
|
+
React__default.Fragment,
|
|
7749
|
+
null,
|
|
7750
|
+
React__default.createElement(
|
|
7751
|
+
Media$1,
|
|
7752
|
+
{
|
|
7753
|
+
key: article._id ? article._id : index$$1,
|
|
7754
|
+
className: 'feature-media',
|
|
7755
|
+
style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
7756
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
7757
|
+
Link,
|
|
7758
|
+
{ href: article.url.current, as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
7759
|
+
React__default.createElement(
|
|
7760
|
+
'a',
|
|
7761
|
+
{ className: 'feature-wrapper' },
|
|
7762
|
+
React__default.createElement(
|
|
7763
|
+
LazyLoad,
|
|
7764
|
+
{ height: imageHeight },
|
|
7765
|
+
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 })
|
|
7766
|
+
)
|
|
7767
|
+
)
|
|
7768
|
+
),
|
|
7769
|
+
React__default.createElement(
|
|
7770
|
+
Media$1.Body,
|
|
7771
|
+
null,
|
|
7772
|
+
React__default.createElement(
|
|
7773
|
+
Link,
|
|
7774
|
+
{ href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
7775
|
+
React__default.createElement(
|
|
7776
|
+
'a',
|
|
7777
|
+
null,
|
|
7778
|
+
article.title && React__default.createElement(
|
|
7779
|
+
'h4',
|
|
7780
|
+
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
7781
|
+
article.title
|
|
7782
|
+
)
|
|
7783
|
+
)
|
|
7784
|
+
),
|
|
7785
|
+
showPublished && article.published && React__default.createElement(
|
|
7786
|
+
'p',
|
|
7787
|
+
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
7788
|
+
moment(article.published).format('MMMM DD, YYYY')
|
|
7789
|
+
),
|
|
7790
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index$$1) {
|
|
7791
|
+
return renderAuthor(authorDetail, index$$1, article.authorMapping.length);
|
|
7792
|
+
}),
|
|
7793
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
7794
|
+
'p',
|
|
7795
|
+
{
|
|
7796
|
+
style: {
|
|
7797
|
+
background: 'var(--highlight)',
|
|
7798
|
+
color: 'var(--highlight-accent)',
|
|
7799
|
+
marginBottom: '.25rem',
|
|
7800
|
+
display: 'inline-block',
|
|
7801
|
+
padding: '0 .25rem',
|
|
7802
|
+
fontSize: '.8rem'
|
|
7803
|
+
} },
|
|
7804
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
7805
|
+
),
|
|
7806
|
+
article.summary && React__default.createElement(
|
|
7807
|
+
'p',
|
|
7808
|
+
{ className: 'pt-2 card-text' },
|
|
7809
|
+
article.summary
|
|
7810
|
+
)
|
|
7811
|
+
)
|
|
7812
|
+
)
|
|
7813
|
+
)
|
|
7814
|
+
),
|
|
7815
|
+
main_36 && rightItems && (index$$1 + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index$$1, numberOfItemsBeforeAd, rightItems)
|
|
7816
|
+
);
|
|
7817
|
+
}
|
|
7818
|
+
}
|
|
7819
|
+
|
|
7653
7820
|
return React__default.createElement(
|
|
7654
7821
|
React__default.Fragment,
|
|
7655
7822
|
{ key: article._id ? article._id : index$$1 },
|
|
@@ -7667,22 +7834,17 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
7667
7834
|
Media$1,
|
|
7668
7835
|
{
|
|
7669
7836
|
key: article._id ? article._id : index$$1,
|
|
7670
|
-
|
|
7671
|
-
style: { flexDirection: article._type == 'feature' ? 'column' : 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
7837
|
+
style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
7672
7838
|
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
7673
7839
|
Link,
|
|
7674
7840
|
{ href: mapping[contentCategoryName] + '/[url]', as: mapping[contentCategoryName] + '/' + article.url.current },
|
|
7675
7841
|
React__default.createElement(
|
|
7676
7842
|
'a',
|
|
7677
|
-
{ className:
|
|
7843
|
+
{ className: 'img-wrapper' },
|
|
7678
7844
|
React__default.createElement(
|
|
7679
7845
|
LazyLoad,
|
|
7680
7846
|
{ height: imageHeight },
|
|
7681
|
-
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', {
|
|
7682
|
-
className: article._type == 'feature' ? 'img-fluid' : 'mr-3 img-fluid',
|
|
7683
|
-
src: renderCardImage(article, builder, imageHeight, imageWidth),
|
|
7684
|
-
alt: article.title
|
|
7685
|
-
}) : 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 })
|
|
7847
|
+
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 })
|
|
7686
7848
|
)
|
|
7687
7849
|
)
|
|
7688
7850
|
),
|
|
@@ -8848,46 +9010,78 @@ var Column1 = function Column1(props) {
|
|
|
8848
9010
|
};
|
|
8849
9011
|
|
|
8850
9012
|
var SideFooter = function SideFooter(props) {
|
|
9013
|
+
/*
|
|
9014
|
+
useage example: <SideFooter cache={props.cache} logo='/an_mjhls_brand_logo.png' />
|
|
9015
|
+
*/
|
|
9016
|
+
var _props$cache$siteSett = props.cache.siteSettingCache,
|
|
9017
|
+
socialLinks = _props$cache$siteSett.socialLinks,
|
|
9018
|
+
footerLinks = _props$cache$siteSett.footerLinks,
|
|
9019
|
+
name = _props$cache$siteSett.name;
|
|
9020
|
+
var logo = props.logo;
|
|
9021
|
+
|
|
8851
9022
|
var year = new Date().getFullYear();
|
|
8852
|
-
var website = props.website;
|
|
8853
9023
|
|
|
8854
9024
|
return React__default.createElement(
|
|
8855
9025
|
'div',
|
|
8856
9026
|
{ className: 'side-footer' },
|
|
8857
|
-
|
|
9027
|
+
React__default.createElement(
|
|
8858
9028
|
'ul',
|
|
8859
9029
|
null,
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
|
|
8863
|
-
|
|
8864
|
-
|
|
8865
|
-
'a',
|
|
8866
|
-
{ target: '_blank', href: content.url },
|
|
8867
|
-
content.title
|
|
8868
|
-
)
|
|
8869
|
-
) : React__default.createElement(
|
|
8870
|
-
'li',
|
|
8871
|
-
{ key: index },
|
|
8872
|
-
React__default.createElement(
|
|
8873
|
-
Link,
|
|
8874
|
-
{ href: content.url },
|
|
9030
|
+
footerLinks && footerLinks.map(function (row, index) {
|
|
9031
|
+
if (row.blank) {
|
|
9032
|
+
return React__default.createElement(
|
|
9033
|
+
'li',
|
|
9034
|
+
{ key: index },
|
|
8875
9035
|
React__default.createElement(
|
|
8876
9036
|
'a',
|
|
8877
|
-
|
|
8878
|
-
|
|
9037
|
+
{ href: row.url, target: '_blank' },
|
|
9038
|
+
row.title
|
|
8879
9039
|
)
|
|
8880
|
-
)
|
|
8881
|
-
|
|
8882
|
-
|
|
9040
|
+
);
|
|
9041
|
+
} else {
|
|
9042
|
+
return React__default.createElement(
|
|
9043
|
+
'li',
|
|
9044
|
+
{ key: index },
|
|
9045
|
+
React__default.createElement(
|
|
9046
|
+
Link,
|
|
9047
|
+
{ href: row.url },
|
|
9048
|
+
React__default.createElement(
|
|
9049
|
+
'a',
|
|
9050
|
+
null,
|
|
9051
|
+
row.title
|
|
9052
|
+
)
|
|
9053
|
+
)
|
|
9054
|
+
);
|
|
9055
|
+
}
|
|
9056
|
+
}),
|
|
9057
|
+
React__default.createElement(
|
|
9058
|
+
'li',
|
|
9059
|
+
{ style: { marginTop: '10px' } },
|
|
9060
|
+
socialLinks && socialLinks.map(function (row, index) {
|
|
9061
|
+
return React__default.createElement(SocialIcon, { key: index, index: index, url: row.url, style: { width: 30, height: 30, marginRight: 5 } });
|
|
9062
|
+
})
|
|
9063
|
+
)
|
|
8883
9064
|
),
|
|
8884
|
-
|
|
9065
|
+
logo && React__default.createElement(
|
|
9066
|
+
'ul',
|
|
9067
|
+
null,
|
|
9068
|
+
React__default.createElement(
|
|
9069
|
+
'li',
|
|
9070
|
+
{ className: 'pt-2' },
|
|
9071
|
+
React__default.createElement(
|
|
9072
|
+
'a',
|
|
9073
|
+
{ href: 'https://www.mjhlifesciences.com' },
|
|
9074
|
+
React__default.createElement('img', { style: { maxWidth: '100%' }, alt: 'MJHLS Brand Logo', src: logo })
|
|
9075
|
+
)
|
|
9076
|
+
)
|
|
9077
|
+
),
|
|
9078
|
+
React__default.createElement(
|
|
8885
9079
|
'p',
|
|
8886
9080
|
null,
|
|
8887
9081
|
'\xA9 ',
|
|
8888
9082
|
year,
|
|
8889
|
-
' ',
|
|
8890
|
-
|
|
9083
|
+
' MJH Life Sciences and ',
|
|
9084
|
+
name,
|
|
8891
9085
|
'. All rights reserved.'
|
|
8892
9086
|
)
|
|
8893
9087
|
);
|
|
@@ -15763,5 +15957,5 @@ var Ustream = function Ustream(_ref) {
|
|
|
15763
15957
|
);
|
|
15764
15958
|
};
|
|
15765
15959
|
|
|
15766
|
-
export { ContentCard as DeckContent, GridContent$1 as GridContent, Queue as DeckQueue, ThumbnailCard, TaxonomyCard, GroupDeck, YoutubeGroup, QueueDeckExpanded, VideoSeriesListing$1 as VideoSeriesListing, MasterDeck$1 as MasterDeck, PublicationDeck, IssueDeck, IssueContentDeck, Column1, Column2, Column3, Header, LeftNav, AccordionPanel, SocialShare, PageFilter, NavMagazine, NavNative, NavNormal, NavDvm, TemplateNormal, AD, AD300x250, AD300x250x600, AD728x90, ADFooter, getSerializers$1 as getSerializers, Search, Feature, Breadcrumbs, SetCookie, Hero, AlphabeticList, PdfDownload, RelatedTopicsDropdown, Ustream };
|
|
15960
|
+
export { ContentCard as DeckContent, GridContent$1 as GridContent, Queue as DeckQueue, ThumbnailCard, TaxonomyCard, GroupDeck, YoutubeGroup, QueueDeckExpanded, VideoSeriesListing$1 as VideoSeriesListing, MasterDeck$1 as MasterDeck, PublicationDeck, IssueDeck, IssueContentDeck, Column1, Column2, Column3, Header, LeftNav, AccordionPanel, SocialShare, PageFilter, NavMagazine, NavNative, NavNormal, NavDvm, TemplateNormal, AD, AD300x250, AD300x250x600, AD728x90, ADFooter, getSerializers$1 as getSerializers, Search, Feature, Breadcrumbs, SetCookie, Hero, AlphabeticList, PdfDownload, RelatedTopicsDropdown, Ustream, SideFooter };
|
|
15767
15961
|
//# sourceMappingURL=index.es.js.map
|