@mjhls/mjh-framework 1.0.521 → 1.0.522

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 CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- # mjh-framework v. 1.0.521
2
+ # mjh-framework v. 1.0.522
3
3
 
4
4
  > Foundation Framework
5
5
 
@@ -253,11 +253,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
253
253
  return React__default.createElement(
254
254
  'div',
255
255
  null,
256
- data && (dataRemapped || React__default.createElement(
257
- 'noscript',
258
- null,
259
- true
260
- )) && data.length > 0 ? // noscript is used so that when javascript is disabled, queuedeck will list all articles
256
+ data && data.length > 0 ? dataRemapped ? // For Javascript Enabled Cases
261
257
  data.map(function (article, index) {
262
258
  var pageNumber = article.pageNumber || values.page;
263
259
  var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
@@ -581,7 +577,336 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
581
577
  )
582
578
  );
583
579
  } else return null;
584
- }) : React__default.createElement(
580
+ }) :
581
+ // For Javascript Disabled Cases
582
+ React__default.createElement(
583
+ 'noscript',
584
+ null,
585
+ data.map(function (article, index) {
586
+ var pageNumber = article.pageNumber || values.page;
587
+ var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
588
+
589
+ if (article._type === 'feature') {
590
+ featureCount++;
591
+ if (article.blank || checkExternalUrl(article.url.current)) {
592
+ return React__default.createElement(
593
+ visibilitySensor.VisibilitySensor,
594
+ {
595
+ key: article._id ? article._id : index,
596
+ partialVisibility: true,
597
+ onChange: function onChange(isVisible) {
598
+ isVisible && changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, index);
599
+ } },
600
+ React__default.createElement(
601
+ React__default.Fragment,
602
+ null,
603
+ React__default.createElement(
604
+ reactBootstrap.Media,
605
+ {
606
+ key: article._id ? article._id : index,
607
+ className: 'feature-media',
608
+ style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
609
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
610
+ 'a',
611
+ { href: article.url.current, target: '_blank', className: 'feature-wrapper' },
612
+ React__default.createElement(
613
+ index$2.LazyLoad,
614
+ { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
615
+ 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 })
616
+ ),
617
+ article.source && React__default.createElement(
618
+ 'div',
619
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
620
+ article.source
621
+ )
622
+ ),
623
+ React__default.createElement(
624
+ reactBootstrap.Media.Body,
625
+ null,
626
+ React__default.createElement(
627
+ 'a',
628
+ { href: article.url.current, target: '_blank' },
629
+ article.title && React__default.createElement(
630
+ 'h4',
631
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
632
+ article.title
633
+ )
634
+ ),
635
+ showPublished && article.published && React__default.createElement(
636
+ 'p',
637
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
638
+ moment.moment(article.published).format('MMMM DD, YYYY')
639
+ ),
640
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
641
+ index$2.LazyLoad,
642
+ { height: 50 },
643
+ React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
644
+ ),
645
+ !article.thumbnail && !defaultImage && article.source && React__default.createElement(
646
+ 'div',
647
+ { className: 'mb-1 sanityDisplayLabel' },
648
+ article.source
649
+ ),
650
+ React__default.createElement(
651
+ 'div',
652
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
653
+ showCategory && article.contentCategory && React__default.createElement(
654
+ 'p',
655
+ {
656
+ className: 'article-category',
657
+ style: {
658
+ background: '#3FB618',
659
+ color: '#ffffff',
660
+ marginBottom: '.25rem',
661
+ display: 'inline-block',
662
+ padding: '0 .25rem',
663
+ fontSize: '.8rem'
664
+ } },
665
+ article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
666
+ ),
667
+ article.issueSection && article.issueSection.name && React__default.createElement(
668
+ 'p',
669
+ {
670
+ className: 'issueSection',
671
+ style: {
672
+ background: '#000000',
673
+ color: '#ffffff',
674
+ marginBottom: '.25rem',
675
+ marginLeft: '.25rem',
676
+ display: 'inline-block',
677
+ padding: '0 .25rem',
678
+ fontSize: '.8rem'
679
+ } },
680
+ article.issueSection.name
681
+ )
682
+ ),
683
+ article.summary && React__default.createElement(
684
+ 'p',
685
+ { className: 'pt-2 card-text' },
686
+ entities.clean_html_1(article.summary)
687
+ )
688
+ )
689
+ )
690
+ )
691
+ );
692
+ } else {
693
+ return React__default.createElement(
694
+ visibilitySensor.VisibilitySensor,
695
+ {
696
+ key: article._id ? article._id : index,
697
+ partialVisibility: true,
698
+ onChange: function onChange(isVisible) {
699
+ isVisible && changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, index);
700
+ } },
701
+ React__default.createElement(
702
+ React__default.Fragment,
703
+ null,
704
+ React__default.createElement(
705
+ reactBootstrap.Media,
706
+ {
707
+ key: article._id ? article._id : index,
708
+ className: 'feature-media',
709
+ style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
710
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
711
+ 'a',
712
+ { href: article.url.current, className: 'feature-wrapper' },
713
+ React__default.createElement(
714
+ index$2.LazyLoad,
715
+ { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
716
+ 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 })
717
+ ),
718
+ article.source && React__default.createElement(
719
+ 'div',
720
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
721
+ article.source
722
+ )
723
+ ),
724
+ React__default.createElement(
725
+ reactBootstrap.Media.Body,
726
+ null,
727
+ React__default.createElement(
728
+ 'a',
729
+ { href: article.url.current },
730
+ article.title && React__default.createElement(
731
+ 'h4',
732
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
733
+ article.title
734
+ )
735
+ ),
736
+ showPublished && article.published && React__default.createElement(
737
+ 'p',
738
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
739
+ moment.moment(article.published).format('MMMM DD, YYYY')
740
+ ),
741
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
742
+ index$2.LazyLoad,
743
+ { height: 50 },
744
+ React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
745
+ ),
746
+ !article.thumbnail && !defaultImage && article.source && React__default.createElement(
747
+ 'div',
748
+ { className: 'mb-1 sanityDisplayLabel' },
749
+ article.source
750
+ ),
751
+ React__default.createElement(
752
+ 'div',
753
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
754
+ showCategory && article.contentCategory && React__default.createElement(
755
+ 'p',
756
+ {
757
+ className: 'article-category',
758
+ style: {
759
+ background: '#3FB618',
760
+ color: '#ffffff',
761
+ marginBottom: '.25rem',
762
+ display: 'inline-block',
763
+ padding: '0 .25rem',
764
+ fontSize: '.8rem'
765
+ } },
766
+ article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
767
+ ),
768
+ article.issueSection && article.issueSection.name && React__default.createElement(
769
+ 'p',
770
+ {
771
+ className: 'issueSection',
772
+ style: {
773
+ background: '#000000',
774
+ color: '#ffffff',
775
+ marginBottom: '.25rem',
776
+ marginLeft: '.25rem',
777
+ display: 'inline-block',
778
+ padding: '0 .25rem',
779
+ fontSize: '.8rem'
780
+ } },
781
+ article.issueSection.name
782
+ )
783
+ ),
784
+ article.summary && React__default.createElement(
785
+ 'p',
786
+ { className: 'pt-2 card-text' },
787
+ entities.clean_html_1(article.summary)
788
+ )
789
+ )
790
+ )
791
+ )
792
+ );
793
+ }
794
+ } else if (article._type === 'lg-infeed' && article.adUnit) {
795
+ return React__default.createElement(ADlgInfeed.ADlgInfeed, _extends._extends({ index: index }, article));
796
+ } else if (article._type === 'brandInsightAd' && article.adUnit) {
797
+ return React__default.createElement(ADInfeed.ADInfeed, { index: index, infeedAd: article });
798
+ }
799
+ if (main.main_36 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0) {
800
+ return renderMobileAd(index, numberOfItemsBeforeAd, rightItems);
801
+ }
802
+
803
+ if ((brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
804
+ return React__default.createElement(
805
+ visibilitySensor.VisibilitySensor,
806
+ {
807
+ key: article._id ? article._id : index,
808
+ onChange: function onChange(isVisible) {
809
+ // Passing 'articleCount' instead of index because index will be including the indexes of ads whereas articleCount will be having index of artilce only.
810
+ isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, article.articleCount ? article.articleCount : index);
811
+ } },
812
+ React__default.createElement(
813
+ React__default.Fragment,
814
+ null,
815
+ React__default.createElement(
816
+ reactBootstrap.Media,
817
+ {
818
+ key: article._id ? article._id : index,
819
+ style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
820
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
821
+ 'a',
822
+ { href: mapping[contentCategoryName] + '/' + article.url.current, className: 'img-wrapper' },
823
+ React__default.createElement(
824
+ index$2.LazyLoad,
825
+ { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
826
+ 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 })
827
+ ),
828
+ article.source && React__default.createElement(
829
+ 'div',
830
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
831
+ article.source
832
+ )
833
+ ),
834
+ React__default.createElement(
835
+ reactBootstrap.Media.Body,
836
+ null,
837
+ React__default.createElement(
838
+ 'a',
839
+ { href: mapping[contentCategoryName] + '/' + article.url.current },
840
+ article.title && React__default.createElement(
841
+ 'h4',
842
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
843
+ article.title
844
+ )
845
+ ),
846
+ showPublished && article.published && React__default.createElement(
847
+ 'p',
848
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
849
+ moment.moment(article.published).format('MMMM DD, YYYY')
850
+ ),
851
+ React__default.createElement(
852
+ 'div',
853
+ { className: 'author-sec', style: { lineHeight: 1.5 } },
854
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
855
+ index$2.LazyLoad,
856
+ { height: 50 },
857
+ React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
858
+ )
859
+ ),
860
+ !article.thumbnail && !defaultImage && article.source && React__default.createElement(
861
+ 'div',
862
+ { className: 'mb-1 sanityDisplayLabel' },
863
+ article.source
864
+ ),
865
+ React__default.createElement(
866
+ 'div',
867
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
868
+ showCategory && article.contentCategory && React__default.createElement(
869
+ 'p',
870
+ {
871
+ className: 'article-category',
872
+ style: {
873
+ background: '#3FB618',
874
+ color: '#ffffff',
875
+ marginBottom: '.25rem',
876
+ display: 'inline-block',
877
+ padding: '0 .25rem',
878
+ fontSize: '.8rem'
879
+ } },
880
+ article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
881
+ ),
882
+ article.issueSection && article.issueSection.name && React__default.createElement(
883
+ 'p',
884
+ {
885
+ className: 'issueSection',
886
+ style: {
887
+ background: '#000000',
888
+ color: '#ffffff',
889
+ marginBottom: '.25rem',
890
+ marginLeft: '.25rem',
891
+ display: 'inline-block',
892
+ padding: '0 .25rem',
893
+ fontSize: '.8rem'
894
+ } },
895
+ article.issueSection.name
896
+ )
897
+ ),
898
+ article.summary && React__default.createElement(
899
+ 'p',
900
+ { className: 'pt-2 card-text' },
901
+ entities.clean_html_1(article.summary)
902
+ )
903
+ )
904
+ )
905
+ )
906
+ );
907
+ } else return null;
908
+ })
909
+ ) : React__default.createElement(
585
910
  'div',
586
911
  null,
587
912
  React__default.createElement(
@@ -247,11 +247,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
247
247
  return React__default.createElement(
248
248
  'div',
249
249
  null,
250
- data && (dataRemapped || React__default.createElement(
251
- 'noscript',
252
- null,
253
- true
254
- )) && data.length > 0 ? // noscript is used so that when javascript is disabled, queuedeck will list all articles
250
+ data && data.length > 0 ? dataRemapped ? // For Javascript Enabled Cases
255
251
  data.map(function (article, index) {
256
252
  var pageNumber = article.pageNumber || values.page;
257
253
  var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
@@ -575,7 +571,336 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
575
571
  )
576
572
  );
577
573
  } else return null;
578
- }) : React__default.createElement(
574
+ }) :
575
+ // For Javascript Disabled Cases
576
+ React__default.createElement(
577
+ 'noscript',
578
+ null,
579
+ data.map(function (article, index) {
580
+ var pageNumber = article.pageNumber || values.page;
581
+ var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
582
+
583
+ if (article._type === 'feature') {
584
+ featureCount++;
585
+ if (article.blank || checkExternalUrl(article.url.current)) {
586
+ return React__default.createElement(
587
+ VisibilitySensor,
588
+ {
589
+ key: article._id ? article._id : index,
590
+ partialVisibility: true,
591
+ onChange: function onChange(isVisible) {
592
+ isVisible && changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, index);
593
+ } },
594
+ React__default.createElement(
595
+ React__default.Fragment,
596
+ null,
597
+ React__default.createElement(
598
+ Media,
599
+ {
600
+ key: article._id ? article._id : index,
601
+ className: 'feature-media',
602
+ style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
603
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
604
+ 'a',
605
+ { href: article.url.current, target: '_blank', className: 'feature-wrapper' },
606
+ React__default.createElement(
607
+ LazyLoad,
608
+ { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
609
+ 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 })
610
+ ),
611
+ article.source && React__default.createElement(
612
+ 'div',
613
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
614
+ article.source
615
+ )
616
+ ),
617
+ React__default.createElement(
618
+ Media.Body,
619
+ null,
620
+ React__default.createElement(
621
+ 'a',
622
+ { href: article.url.current, target: '_blank' },
623
+ article.title && React__default.createElement(
624
+ 'h4',
625
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
626
+ article.title
627
+ )
628
+ ),
629
+ showPublished && article.published && React__default.createElement(
630
+ 'p',
631
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
632
+ moment(article.published).format('MMMM DD, YYYY')
633
+ ),
634
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
635
+ LazyLoad,
636
+ { height: 50 },
637
+ React__default.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
638
+ ),
639
+ !article.thumbnail && !defaultImage && article.source && React__default.createElement(
640
+ 'div',
641
+ { className: 'mb-1 sanityDisplayLabel' },
642
+ article.source
643
+ ),
644
+ React__default.createElement(
645
+ 'div',
646
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
647
+ showCategory && article.contentCategory && React__default.createElement(
648
+ 'p',
649
+ {
650
+ className: 'article-category',
651
+ style: {
652
+ background: '#3FB618',
653
+ color: '#ffffff',
654
+ marginBottom: '.25rem',
655
+ display: 'inline-block',
656
+ padding: '0 .25rem',
657
+ fontSize: '.8rem'
658
+ } },
659
+ article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
660
+ ),
661
+ article.issueSection && article.issueSection.name && React__default.createElement(
662
+ 'p',
663
+ {
664
+ className: 'issueSection',
665
+ style: {
666
+ background: '#000000',
667
+ color: '#ffffff',
668
+ marginBottom: '.25rem',
669
+ marginLeft: '.25rem',
670
+ display: 'inline-block',
671
+ padding: '0 .25rem',
672
+ fontSize: '.8rem'
673
+ } },
674
+ article.issueSection.name
675
+ )
676
+ ),
677
+ article.summary && React__default.createElement(
678
+ 'p',
679
+ { className: 'pt-2 card-text' },
680
+ clean_html_1(article.summary)
681
+ )
682
+ )
683
+ )
684
+ )
685
+ );
686
+ } else {
687
+ return React__default.createElement(
688
+ VisibilitySensor,
689
+ {
690
+ key: article._id ? article._id : index,
691
+ partialVisibility: true,
692
+ onChange: function onChange(isVisible) {
693
+ isVisible && changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, index);
694
+ } },
695
+ React__default.createElement(
696
+ React__default.Fragment,
697
+ null,
698
+ React__default.createElement(
699
+ Media,
700
+ {
701
+ key: article._id ? article._id : index,
702
+ className: 'feature-media',
703
+ style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
704
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
705
+ 'a',
706
+ { href: article.url.current, className: 'feature-wrapper' },
707
+ React__default.createElement(
708
+ LazyLoad,
709
+ { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
710
+ 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 })
711
+ ),
712
+ article.source && React__default.createElement(
713
+ 'div',
714
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
715
+ article.source
716
+ )
717
+ ),
718
+ React__default.createElement(
719
+ Media.Body,
720
+ null,
721
+ React__default.createElement(
722
+ 'a',
723
+ { href: article.url.current },
724
+ article.title && React__default.createElement(
725
+ 'h4',
726
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
727
+ article.title
728
+ )
729
+ ),
730
+ showPublished && article.published && React__default.createElement(
731
+ 'p',
732
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
733
+ moment(article.published).format('MMMM DD, YYYY')
734
+ ),
735
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
736
+ LazyLoad,
737
+ { height: 50 },
738
+ React__default.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
739
+ ),
740
+ !article.thumbnail && !defaultImage && article.source && React__default.createElement(
741
+ 'div',
742
+ { className: 'mb-1 sanityDisplayLabel' },
743
+ article.source
744
+ ),
745
+ React__default.createElement(
746
+ 'div',
747
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
748
+ showCategory && article.contentCategory && React__default.createElement(
749
+ 'p',
750
+ {
751
+ className: 'article-category',
752
+ style: {
753
+ background: '#3FB618',
754
+ color: '#ffffff',
755
+ marginBottom: '.25rem',
756
+ display: 'inline-block',
757
+ padding: '0 .25rem',
758
+ fontSize: '.8rem'
759
+ } },
760
+ article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
761
+ ),
762
+ article.issueSection && article.issueSection.name && React__default.createElement(
763
+ 'p',
764
+ {
765
+ className: 'issueSection',
766
+ style: {
767
+ background: '#000000',
768
+ color: '#ffffff',
769
+ marginBottom: '.25rem',
770
+ marginLeft: '.25rem',
771
+ display: 'inline-block',
772
+ padding: '0 .25rem',
773
+ fontSize: '.8rem'
774
+ } },
775
+ article.issueSection.name
776
+ )
777
+ ),
778
+ article.summary && React__default.createElement(
779
+ 'p',
780
+ { className: 'pt-2 card-text' },
781
+ clean_html_1(article.summary)
782
+ )
783
+ )
784
+ )
785
+ )
786
+ );
787
+ }
788
+ } else if (article._type === 'lg-infeed' && article.adUnit) {
789
+ return React__default.createElement(ADlgInfeed, _extends({ index: index }, article));
790
+ } else if (article._type === 'brandInsightAd' && article.adUnit) {
791
+ return React__default.createElement(ADInfeed, { index: index, infeedAd: article });
792
+ }
793
+ if (main_36 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0) {
794
+ return renderMobileAd(index, numberOfItemsBeforeAd, rightItems);
795
+ }
796
+
797
+ if ((brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
798
+ return React__default.createElement(
799
+ VisibilitySensor,
800
+ {
801
+ key: article._id ? article._id : index,
802
+ onChange: function onChange(isVisible) {
803
+ // Passing 'articleCount' instead of index because index will be including the indexes of ads whereas articleCount will be having index of artilce only.
804
+ isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, article.articleCount ? article.articleCount : index);
805
+ } },
806
+ React__default.createElement(
807
+ React__default.Fragment,
808
+ null,
809
+ React__default.createElement(
810
+ Media,
811
+ {
812
+ key: article._id ? article._id : index,
813
+ style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
814
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
815
+ 'a',
816
+ { href: mapping[contentCategoryName] + '/' + article.url.current, className: 'img-wrapper' },
817
+ React__default.createElement(
818
+ LazyLoad,
819
+ { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
820
+ 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 })
821
+ ),
822
+ article.source && React__default.createElement(
823
+ 'div',
824
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
825
+ article.source
826
+ )
827
+ ),
828
+ React__default.createElement(
829
+ Media.Body,
830
+ null,
831
+ React__default.createElement(
832
+ 'a',
833
+ { href: mapping[contentCategoryName] + '/' + article.url.current },
834
+ article.title && React__default.createElement(
835
+ 'h4',
836
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
837
+ article.title
838
+ )
839
+ ),
840
+ showPublished && article.published && React__default.createElement(
841
+ 'p',
842
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
843
+ moment(article.published).format('MMMM DD, YYYY')
844
+ ),
845
+ React__default.createElement(
846
+ 'div',
847
+ { className: 'author-sec', style: { lineHeight: 1.5 } },
848
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
849
+ LazyLoad,
850
+ { height: 50 },
851
+ React__default.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
852
+ )
853
+ ),
854
+ !article.thumbnail && !defaultImage && article.source && React__default.createElement(
855
+ 'div',
856
+ { className: 'mb-1 sanityDisplayLabel' },
857
+ article.source
858
+ ),
859
+ React__default.createElement(
860
+ 'div',
861
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
862
+ showCategory && article.contentCategory && React__default.createElement(
863
+ 'p',
864
+ {
865
+ className: 'article-category',
866
+ style: {
867
+ background: '#3FB618',
868
+ color: '#ffffff',
869
+ marginBottom: '.25rem',
870
+ display: 'inline-block',
871
+ padding: '0 .25rem',
872
+ fontSize: '.8rem'
873
+ } },
874
+ article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
875
+ ),
876
+ article.issueSection && article.issueSection.name && React__default.createElement(
877
+ 'p',
878
+ {
879
+ className: 'issueSection',
880
+ style: {
881
+ background: '#000000',
882
+ color: '#ffffff',
883
+ marginBottom: '.25rem',
884
+ marginLeft: '.25rem',
885
+ display: 'inline-block',
886
+ padding: '0 .25rem',
887
+ fontSize: '.8rem'
888
+ } },
889
+ article.issueSection.name
890
+ )
891
+ ),
892
+ article.summary && React__default.createElement(
893
+ 'p',
894
+ { className: 'pt-2 card-text' },
895
+ clean_html_1(article.summary)
896
+ )
897
+ )
898
+ )
899
+ )
900
+ );
901
+ } else return null;
902
+ })
903
+ ) : React__default.createElement(
579
904
  'div',
580
905
  null,
581
906
  React__default.createElement(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.521",
3
+ "version": "1.0.522",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",