@mjhls/mjh-framework 1.0.880-beta.0 → 1.0.880
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 +168 -168
- package/dist/cjs/AD.js +10 -9
- package/dist/cjs/AD300x250.js +29 -28
- package/dist/cjs/AD300x250x600.js +29 -28
- package/dist/cjs/AD728x90.js +32 -31
- package/dist/cjs/ADFloatingFooter.js +31 -30
- package/dist/cjs/ADFooter.js +13 -12
- package/dist/cjs/ADGutter.js +31 -30
- package/dist/cjs/{ADInfeed-2e48af77.js → ADInfeed-9a2e923a.js} +15 -13
- package/dist/cjs/ADSkyscraper.js +31 -30
- package/dist/cjs/ADSponsoredResources.js +31 -30
- package/dist/cjs/ADWebcast.js +31 -30
- package/dist/cjs/ADWelcome.js +32 -31
- package/dist/cjs/{ADlgInfeed-c39c7131.js → ADlgInfeed-957a1996.js} +11 -10
- package/dist/cjs/AccordionPanel.js +29 -27
- package/dist/cjs/AdSlot.js +32 -31
- package/dist/cjs/AdSlotsProvider.js +18 -909
- package/dist/cjs/AlgoliaSearch.js +1391 -1272
- package/dist/cjs/AlphabeticList.js +24 -23
- package/dist/cjs/ArticleCarousel.js +21 -19
- package/dist/cjs/ArticleProgramLandingPage.js +61 -59
- package/dist/cjs/ArticleSeriesLandingPage.js +44 -38
- package/dist/cjs/ArticleSeriesListing.js +60 -58
- package/dist/cjs/Auth.js +680 -1504
- package/dist/cjs/AuthWrapper.js +309 -267
- package/dist/cjs/{AuthorComponent-02e827ae.js → AuthorComponent-39b37d84.js} +14 -13
- package/dist/cjs/Beam.js +6 -6
- package/dist/cjs/{BlockContent-9c6b07ad.js → BlockContent-36e54d77.js} +56 -55
- package/dist/cjs/Breadcrumbs.js +27 -25
- package/dist/cjs/CMEDeck.js +81 -81
- package/dist/cjs/Column1.js +14 -11
- package/dist/cjs/Column2.js +34 -31
- package/dist/cjs/Column3.js +60 -57
- package/dist/cjs/ConferenceArticleCard.js +43 -41
- package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
- package/dist/cjs/DeckContent.js +105 -100
- package/dist/cjs/DeckQueue.js +91 -86
- package/dist/cjs/{Dfp-14d2455c.js → Dfp-9be904d5.js} +33 -32
- package/dist/cjs/EventsDeck.js +157 -150
- package/dist/cjs/ExternalResources.js +80 -78
- package/dist/cjs/Feature.js +31 -28
- package/dist/cjs/ForbesHero.js +43 -41
- package/dist/cjs/GridContent.js +237 -231
- package/dist/cjs/GridHero.js +45 -43
- package/dist/cjs/GroupDeck.js +60 -58
- package/dist/cjs/HamMagazine.js +143 -138
- package/dist/cjs/Header.js +14 -12
- package/dist/cjs/Hero.js +16 -14
- package/dist/cjs/HighlightenVideo.js +18 -17
- package/dist/cjs/HorizontalArticleListing.js +72 -70
- package/dist/cjs/HorizontalHero.js +30 -28
- package/dist/cjs/IssueContentDeck.js +77 -71
- package/dist/cjs/IssueDeck.js +76 -70
- package/dist/cjs/IssueLanding.js +94 -91
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +39 -37
- package/dist/cjs/MasterDeck.js +355 -227
- package/dist/cjs/MediaSeriesLanding.js +1118 -1126
- package/dist/cjs/NavDvm.js +77 -72
- package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
- package/dist/cjs/NavMagazine.js +150 -145
- package/dist/cjs/NavNative.js +145 -137
- package/dist/cjs/OncliveHero.js +24 -23
- package/dist/cjs/OncliveLargeHero.js +75 -73
- package/dist/cjs/PageFilter.js +13 -12
- package/dist/cjs/PartnerDetailListing.js +119 -3917
- package/dist/cjs/PdfDownload.js +9 -8
- package/dist/cjs/PopUpModal.js +19 -17
- package/dist/cjs/PubSection.js +41 -38
- package/dist/cjs/PubToc.js +14 -13
- package/dist/cjs/PublicationDeck.js +71 -65
- package/dist/cjs/PublicationLanding.js +137 -133
- package/dist/cjs/QueueDeckExpanded.js +1173 -1001
- package/dist/cjs/RecentNews.js +22 -21
- package/dist/cjs/RelatedContent.js +59 -57
- package/dist/cjs/RelatedTopicsDropdown.js +32 -29
- package/dist/cjs/RolesDeck.js +32 -27
- package/dist/cjs/Search.js +20 -16
- package/dist/cjs/Segment.js +4 -4
- package/dist/cjs/SeriesListingDeck.js +37 -36
- package/dist/cjs/{SeriesSlider-ec146338.js → SeriesSlider-ce3261cb.js} +41 -40
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +37 -36
- package/dist/cjs/SocialIcons.js +10 -9
- package/dist/cjs/{SocialSearchComponent-e8477ca3.js → SocialSearchComponent-5ec44406.js} +40 -36
- package/dist/cjs/SocialShare.js +31 -29
- package/dist/cjs/TaxonomyCard.js +67 -61
- package/dist/cjs/TaxonomyDescription.js +55 -53
- package/dist/cjs/TemplateNormal.js +73 -72
- package/dist/cjs/ThumbnailCard.js +26 -23
- package/dist/cjs/Ustream.js +28 -27
- package/dist/cjs/VerticalHero.js +22 -20
- package/dist/cjs/VideoProgramLandingPage.js +78 -73
- package/dist/cjs/VideoSeriesCard.js +34 -32
- package/dist/cjs/VideoSeriesFilter.js +16 -16
- package/dist/cjs/VideoSeriesLandingPage.js +52 -48
- package/dist/cjs/VideoSeriesListing.js +77 -75
- package/dist/cjs/View.js +275 -271
- package/dist/cjs/YahooHero.js +42 -40
- package/dist/cjs/YoutubeGroup.js +68 -66
- package/dist/cjs/{_is-array-aa52fa1e.js → _is-array-54228b29.js} +6 -6
- package/dist/cjs/{_iter-detect-05795553.js → _iter-detect-b1df62f0.js} +7 -7
- package/dist/cjs/{_object-pie-68c5bcbc.js → _object-pie-083f2dd6.js} +4 -4
- package/dist/cjs/{_object-sap-171b9ea5.js → _object-sap-d1978572.js} +1 -1
- package/dist/cjs/{_object-to-array-9bac8737.js → _object-to-array-ce86cae7.js} +2 -2
- package/dist/cjs/{asyncToGenerator-df19209d.js → asyncToGenerator-77821af0.js} +30 -30
- package/dist/cjs/{brightcove-react-player-loader.es-156bd4d6.js → brightcove-react-player-loader.es-a195642e.js} +11 -9
- package/dist/cjs/{core.get-iterator-method-f3c44602.js → core.get-iterator-method-5643aa10.js} +35 -35
- package/dist/cjs/{debounce-529c8d06.js → debounce-d4a2369b.js} +2 -2
- package/dist/cjs/{define-property-21887c62.js → define-property-e8404b64.js} +6 -6
- package/dist/cjs/{defineProperty-77a37684.js → defineProperty-9673846a.js} +1 -1
- package/dist/cjs/{entities-310b46ee.js → entities-3f9d0f2f.js} +1 -1
- package/dist/cjs/{eq-bb2843ed.js → eq-5fc26c07.js} +1 -1
- package/dist/cjs/{extends-eed4f016.js → extends-7c86182f.js} +7 -7
- package/dist/cjs/faundadb.js +19 -19
- package/dist/cjs/{get-adbb11e3.js → get-5839e5b5.js} +21 -21
- package/dist/cjs/getRelatedArticle.js +18 -18
- package/dist/cjs/getRootDocGroup.js +6 -6
- package/dist/cjs/getSerializers.js +43 -42
- package/dist/cjs/{getTargeting-8874437b.js → getTargeting-9d509319.js} +12 -12
- package/dist/cjs/getTargeting.js +6 -6
- package/dist/cjs/iconBase-68959171.js +0 -3
- package/dist/cjs/{index-17c6af5a.js → index-22bdde81.js} +1093 -1067
- package/dist/cjs/{index-e2e62963.js → index-8041a4eb.js} +11 -1
- package/dist/cjs/{index-96b3db50.js → index-eadd5035.js} +17 -15
- package/dist/cjs/{urlFor-3a61226f.js → index-efca863c.js} +37 -88
- package/dist/cjs/{index-3294d3bc.js → index-f86bb269.js} +44 -45
- package/dist/cjs/{index-98e01cb9.js → index-fc2f1ca2.js} +13 -12
- package/dist/cjs/{index.es-9110add6.js → index.es-f3e47207.js} +31 -12
- package/dist/cjs/{index.esm-ff47db6f.js → index.esm-05850a2f.js} +5 -12
- package/dist/cjs/{index.esm-e32d3e8e.js → index.esm-44f3e2d0.js} +3 -6
- package/dist/cjs/{index.esm-4d410430.js → index.esm-8123cf40.js} +20 -20
- package/dist/cjs/{index.esm-90433435.js → index.esm-974f47d9.js} +6 -15
- package/dist/cjs/index.js +170 -164
- package/dist/cjs/{inherits-cba9c846.js → inherits-de66ea16.js} +19 -19
- package/dist/cjs/{isSymbol-04666465.js → isSymbol-03abbdf0.js} +15 -15
- package/dist/cjs/{keys-d207942e.js → keys-e982b3fa.js} +6 -6
- package/dist/cjs/{lodash-fc2922d0.js → lodash-f0783643.js} +128 -31
- package/dist/cjs/main-025fdc78.js +973 -0
- package/dist/cjs/{md5-5039b1a6.js → md5-e1ca5797.js} +1 -1
- package/dist/cjs/{moment-575fe24c.js → moment-aca40de1.js} +11 -9
- package/dist/cjs/{react-social-icons-f7f48f71.js → react-social-icons-af932527.js} +28 -27
- package/dist/cjs/{slicedToArray-f6d4eaa8.js → slicedToArray-067dd3bc.js} +12 -12
- package/dist/cjs/{smoothscroll-5054361f.js → smoothscroll-99df7f93.js} +1 -1
- package/dist/cjs/{stringify-bbc68047.js → stringify-f7a37a8d.js} +5 -5
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-c9b8a0d0.js → toConsumableArray-d7797c2b.js} +7 -7
- package/dist/cjs/{toNumber-36d1e7e5.js → toNumber-5e1fac58.js} +40 -5
- package/dist/cjs/{typeof-5f52cf64.js → typeof-567e31ff.js} +35 -35
- package/dist/cjs/urlFor.js +59 -5
- package/dist/cjs/{ustream-api-9ebe112f.js → ustream-api-3819e4aa.js} +4 -4
- package/dist/cjs/{util-f2c1b65b.js → util-6f784d85.js} +1 -1
- package/dist/cjs/{visibility-sensor-ad5e3116.js → visibility-sensor-eb2c5b69.js} +7 -5
- package/dist/cjs/{web.dom.iterable-e34bf324.js → web.dom.iterable-d98303e0.js} +2 -2
- package/dist/esm/AD.js +7 -7
- package/dist/esm/AD300x250.js +25 -25
- package/dist/esm/AD300x250x600.js +25 -25
- package/dist/esm/AD728x90.js +28 -28
- package/dist/esm/ADFloatingFooter.js +27 -27
- package/dist/esm/ADFooter.js +9 -9
- package/dist/esm/ADGutter.js +27 -27
- package/dist/esm/{ADInfeed-0c13c803.js → ADInfeed-8c5f8c58.js} +11 -11
- package/dist/esm/ADSkyscraper.js +27 -27
- package/dist/esm/ADSponsoredResources.js +27 -27
- package/dist/esm/ADWebcast.js +27 -27
- package/dist/esm/ADWelcome.js +28 -28
- package/dist/esm/{ADlgInfeed-e4e2031a.js → ADlgInfeed-2316e091.js} +8 -8
- package/dist/esm/AccordionPanel.js +22 -22
- package/dist/esm/AdSlot.js +23 -23
- package/dist/esm/AdSlotsProvider.js +15 -907
- package/dist/esm/AlgoliaSearch.js +820 -702
- package/dist/esm/AlphabeticList.js +20 -20
- package/dist/esm/ArticleCarousel.js +17 -16
- package/dist/esm/ArticleProgramLandingPage.js +54 -53
- package/dist/esm/ArticleSeriesLandingPage.js +38 -33
- package/dist/esm/ArticleSeriesListing.js +55 -54
- package/dist/esm/Auth.js +659 -1487
- package/dist/esm/AuthWrapper.js +306 -265
- package/dist/esm/{AuthorComponent-e6f95c2f.js → AuthorComponent-46a745ba.js} +11 -11
- package/dist/esm/Beam.js +6 -6
- package/dist/esm/{BlockContent-f4515898.js → BlockContent-52cf21c5.js} +35 -35
- package/dist/esm/Breadcrumbs.js +15 -15
- package/dist/esm/CMEDeck.js +77 -77
- package/dist/esm/Column1.js +9 -9
- package/dist/esm/Column2.js +28 -28
- package/dist/esm/Column3.js +54 -54
- package/dist/esm/ConferenceArticleCard.js +38 -37
- package/dist/esm/{ConferenceBanner-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
- package/dist/esm/DeckContent.js +96 -95
- package/dist/esm/DeckQueue.js +82 -81
- package/dist/esm/{Dfp-f867d061.js → Dfp-4ca12f2e.js} +20 -20
- package/dist/esm/EventsDeck.js +129 -129
- package/dist/esm/ExternalResources.js +73 -72
- package/dist/esm/Feature.js +22 -21
- package/dist/esm/ForbesHero.js +33 -32
- package/dist/esm/GridContent.js +199 -198
- package/dist/esm/GridHero.js +35 -34
- package/dist/esm/GroupDeck.js +45 -44
- package/dist/esm/HamMagazine.js +114 -114
- package/dist/esm/Header.js +8 -8
- package/dist/esm/Hero.js +13 -12
- package/dist/esm/HighlightenVideo.js +14 -14
- package/dist/esm/HorizontalArticleListing.js +68 -67
- package/dist/esm/HorizontalHero.js +25 -24
- package/dist/esm/IssueContentDeck.js +59 -58
- package/dist/esm/IssueDeck.js +63 -62
- package/dist/esm/IssueLanding.js +90 -88
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/LeftNav.js +33 -33
- package/dist/esm/MasterDeck.js +350 -223
- package/dist/esm/MediaSeriesLanding.js +839 -850
- package/dist/esm/NavDvm.js +57 -57
- package/dist/esm/{NavFooter-e27bd93b.js → NavFooter-c29526b7.js} +12 -12
- package/dist/esm/NavMagazine.js +124 -124
- package/dist/esm/NavNative.js +114 -114
- package/dist/esm/OncliveHero.js +20 -20
- package/dist/esm/OncliveLargeHero.js +58 -57
- package/dist/esm/PageFilter.js +10 -10
- package/dist/esm/PartnerDetailListing.js +112 -3910
- package/dist/esm/PdfDownload.js +6 -6
- package/dist/esm/PopUpModal.js +12 -12
- package/dist/esm/PubSection.js +37 -35
- package/dist/esm/PubToc.js +10 -10
- package/dist/esm/PublicationDeck.js +56 -55
- package/dist/esm/PublicationLanding.js +120 -120
- package/dist/esm/QueueDeckExpanded.js +1166 -994
- package/dist/esm/RecentNews.js +19 -19
- package/dist/esm/RelatedContent.js +51 -50
- package/dist/esm/RelatedTopicsDropdown.js +21 -21
- package/dist/esm/RolesDeck.js +25 -25
- package/dist/esm/Search.js +11 -11
- package/dist/esm/Segment.js +4 -4
- package/dist/esm/SeriesListingDeck.js +31 -30
- package/dist/esm/{SeriesSlider-d6561e33.js → SeriesSlider-7a6c45ce.js} +31 -31
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +32 -32
- package/dist/esm/SocialIcons.js +7 -7
- package/dist/esm/{SocialSearchComponent-b5be0e6c.js → SocialSearchComponent-bdecba55.js} +30 -30
- package/dist/esm/SocialShare.js +25 -25
- package/dist/esm/TaxonomyCard.js +56 -55
- package/dist/esm/TaxonomyDescription.js +49 -48
- package/dist/esm/TemplateNormal.js +68 -68
- package/dist/esm/ThumbnailCard.js +17 -16
- package/dist/esm/Ustream.js +24 -24
- package/dist/esm/VerticalHero.js +17 -16
- package/dist/esm/VideoProgramLandingPage.js +65 -64
- package/dist/esm/VideoSeriesCard.js +26 -25
- package/dist/esm/VideoSeriesFilter.js +13 -13
- package/dist/esm/VideoSeriesLandingPage.js +42 -39
- package/dist/esm/VideoSeriesListing.js +72 -71
- package/dist/esm/View.js +246 -246
- package/dist/esm/YahooHero.js +33 -32
- package/dist/esm/YoutubeGroup.js +52 -51
- package/dist/esm/{_is-array-4df618a6.js → _is-array-893ab020.js} +6 -6
- package/dist/esm/{_iter-detect-130ee549.js → _iter-detect-f089461c.js} +7 -7
- package/dist/esm/{_object-pie-33c40e79.js → _object-pie-133f504a.js} +4 -4
- package/dist/esm/{_object-sap-8b8ea5a9.js → _object-sap-169d6272.js} +1 -1
- package/dist/esm/{_object-to-array-c54dd835.js → _object-to-array-50a6b9a3.js} +2 -2
- package/dist/esm/{asyncToGenerator-64812e90.js → asyncToGenerator-b4dfe691.js} +31 -31
- package/dist/esm/{brightcove-react-player-loader.es-83f53e4e.js → brightcove-react-player-loader.es-b43c695a.js} +7 -6
- package/dist/esm/{core.get-iterator-method-86d4db69.js → core.get-iterator-method-e903ff31.js} +36 -36
- package/dist/esm/{debounce-9207d8ee.js → debounce-533d9748.js} +2 -2
- package/dist/esm/{define-property-6d26cb48.js → define-property-99e66838.js} +6 -6
- package/dist/esm/{defineProperty-d7d9b577.js → defineProperty-8fa0bc8d.js} +1 -1
- package/dist/esm/{entities-7cc3bf45.js → entities-932b50cf.js} +1 -1
- package/dist/esm/{eq-b470f743.js → eq-bdcbf886.js} +1 -1
- package/dist/esm/{extends-5b1796d4.js → extends-dc6a71fd.js} +7 -7
- package/dist/esm/faundadb.js +5 -5
- package/dist/esm/{get-1e515072.js → get-3c308da4.js} +21 -21
- package/dist/esm/getRelatedArticle.js +12 -12
- package/dist/esm/getRootDocGroup.js +4 -4
- package/dist/esm/getSerializers.js +43 -42
- package/dist/esm/{getTargeting-277c801e.js → getTargeting-ff2c9409.js} +11 -11
- package/dist/esm/getTargeting.js +6 -6
- package/dist/esm/{urlFor-23b2244b.js → index-0dbff1d1.js} +37 -88
- package/dist/esm/{index-41a678ea.js → index-2446af28.js} +6 -6
- package/dist/esm/{index-5f7e79e7.js → index-35bdcc81.js} +10 -10
- package/dist/esm/{index-aaa2dae0.js → index-67e1773f.js} +11 -2
- package/dist/esm/{index-ef6d5dcf.js → index-79cfd25c.js} +44 -45
- package/dist/esm/{index-a35a5c39.js → index-c9bfc91f.js} +1017 -1001
- package/dist/esm/{index.es-29c1cef5.js → index.es-c6222053.js} +28 -10
- package/dist/esm/{index.esm-29e48d38.js → index.esm-3fdda599.js} +6 -15
- package/dist/esm/{index.esm-fd746768.js → index.esm-8016b507.js} +17 -18
- package/dist/esm/{index.esm-cf08bf18.js → index.esm-a8ff922c.js} +5 -12
- package/dist/esm/{index.esm-f8aaeeeb.js → index.esm-c6715e80.js} +3 -6
- package/dist/esm/index.js +140 -137
- package/dist/esm/{inherits-2409637d.js → inherits-8a801a18.js} +18 -18
- package/dist/esm/{isSymbol-1981418f.js → isSymbol-a7e9aafe.js} +15 -15
- package/dist/esm/{keys-69989821.js → keys-425c8ab0.js} +6 -6
- package/dist/esm/{lodash-17fdfebb.js → lodash-f97fd99a.js} +128 -31
- package/dist/esm/main-4136096f.js +961 -0
- package/dist/esm/{md5-9be0e905.js → md5-4e42248e.js} +1 -1
- package/dist/esm/{moment-e2f9b20c.js → moment-bc12cb97.js} +11 -9
- package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-91f9716f.js} +20 -20
- package/dist/esm/{slicedToArray-67a08c9c.js → slicedToArray-ca2c8b8d.js} +12 -12
- package/dist/esm/{smoothscroll-0cd4c7a6.js → smoothscroll-fa4e3f8c.js} +1 -1
- package/dist/esm/stringify-c21932b3.js +15 -0
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-32282905.js → toConsumableArray-7b1c0e23.js} +7 -7
- package/dist/esm/{toNumber-2f7a84cd.js → toNumber-5aeba6e7.js} +40 -5
- package/dist/esm/{typeof-c05a82ba.js → typeof-83d9eb10.js} +35 -35
- package/dist/esm/urlFor.js +62 -4
- package/dist/esm/{ustream-api-4c4fe0ba.js → ustream-api-41166338.js} +4 -4
- package/dist/esm/{util-7700fc59.js → util-3ab476bf.js} +1 -1
- package/dist/esm/{visibility-sensor-72fd8f8b.js → visibility-sensor-f40c2564.js} +2 -2
- package/dist/esm/{web.dom.iterable-f8f967cd.js → web.dom.iterable-fdf034f5.js} +2 -2
- package/package.json +111 -112
- package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
- package/dist/cjs/Pagination-9cb60fba.js +0 -61
- package/dist/cjs/inherits-8d29278d.js +0 -110
- package/dist/cjs/main-02daeefe.js +0 -862
- package/dist/esm/Pagination-256b60e5.js +0 -56
- package/dist/esm/inherits-77d5e4fc.js +0 -101
- package/dist/esm/main-c0612122.js +0 -851
- package/dist/esm/stringify-70b72959.js +0 -15
|
@@ -1,84 +1,163 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require('./
|
|
6
|
-
require('./core.get-iterator-method-f3c44602.js');
|
|
7
|
-
require('./_library-dd23b178.js');
|
|
8
|
-
require('./_iter-detect-05795553.js');
|
|
9
|
-
var toConsumableArray = require('./toConsumableArray-c9b8a0d0.js');
|
|
10
|
-
require('./_object-pie-68c5bcbc.js');
|
|
11
|
-
var _extends = require('./extends-eed4f016.js');
|
|
12
|
-
require('./web.dom.iterable-e34bf324.js');
|
|
3
|
+
var slicedToArray = require('./slicedToArray-067dd3bc.js');
|
|
4
|
+
var toConsumableArray = require('./toConsumableArray-d7797c2b.js');
|
|
5
|
+
var _extends = require('./extends-7c86182f.js');
|
|
13
6
|
var React = require('react');
|
|
14
|
-
var
|
|
7
|
+
var reactBootstrap = require('react-bootstrap');
|
|
8
|
+
var urlFor = require('./urlFor.js');
|
|
9
|
+
var index_es = require('./index.es-f3e47207.js');
|
|
10
|
+
var moment = require('./moment-aca40de1.js');
|
|
11
|
+
var visibilitySensor = require('./visibility-sensor-eb2c5b69.js');
|
|
12
|
+
var index$1 = require('./index-fc2f1ca2.js');
|
|
13
|
+
var Router = require('next/router');
|
|
14
|
+
var index = require('./index-eadd5035.js');
|
|
15
|
+
var main = require('./main-025fdc78.js');
|
|
16
|
+
var entities = require('./entities-3f9d0f2f.js');
|
|
17
|
+
var ADInfeed = require('./ADInfeed-9a2e923a.js');
|
|
18
|
+
var AuthorComponent = require('./AuthorComponent-39b37d84.js');
|
|
19
|
+
var lodash = require('./lodash-f0783643.js');
|
|
20
|
+
var ADlgInfeed = require('./ADlgInfeed-957a1996.js');
|
|
21
|
+
var getContentCategory = require('./getContentCategory-f38a4c00.js');
|
|
22
|
+
var timeDifferenceCalc = require('./timeDifferenceCalc.js');
|
|
23
|
+
require('./_commonjsHelpers-06173234.js');
|
|
24
|
+
require('./web.dom.iterable-d98303e0.js');
|
|
25
|
+
require('./core.get-iterator-method-5643aa10.js');
|
|
26
|
+
require('./_iter-detect-b1df62f0.js');
|
|
27
|
+
require('./_object-pie-083f2dd6.js');
|
|
28
|
+
require('./index-efca863c.js');
|
|
29
|
+
require('react-dom');
|
|
15
30
|
require('./events-1b438fe7.js');
|
|
16
|
-
var index = require('./index-98e01cb9.js');
|
|
17
31
|
require('prop-types');
|
|
18
32
|
require('react-bootstrap/Card');
|
|
19
|
-
var moment = require('./moment-575fe24c.js');
|
|
20
|
-
var Router = require('next/router');
|
|
21
|
-
var Router__default = _interopDefault(Router);
|
|
22
|
-
require('./isSymbol-04666465.js');
|
|
23
|
-
require('./debounce-529c8d06.js');
|
|
24
|
-
require('./toNumber-36d1e7e5.js');
|
|
25
|
-
require('react-dom');
|
|
26
|
-
var slicedToArray = require('./slicedToArray-f6d4eaa8.js');
|
|
27
|
-
var urlFor = require('./urlFor-3a61226f.js');
|
|
28
|
-
var index$1 = require('./index-96b3db50.js');
|
|
29
|
-
var main = require('./main-02daeefe.js');
|
|
30
|
-
var entities = require('./entities-310b46ee.js');
|
|
31
|
-
require('./stringify-bbc68047.js');
|
|
32
|
-
var asyncToGenerator = require('./asyncToGenerator-df19209d.js');
|
|
33
|
-
require('./Segment.js');
|
|
34
|
-
require('./Beam.js');
|
|
35
33
|
require('./AdSlot.js');
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
require('./debounce-d4a2369b.js');
|
|
35
|
+
require('./isSymbol-03abbdf0.js');
|
|
36
|
+
require('./toNumber-5e1fac58.js');
|
|
37
|
+
require('./Beam.js');
|
|
38
|
+
require('./stringify-f7a37a8d.js');
|
|
39
|
+
require('./asyncToGenerator-77821af0.js');
|
|
40
|
+
require('./_library-dd23b178.js');
|
|
41
|
+
require('./Segment.js');
|
|
42
|
+
|
|
43
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
44
44
|
|
|
45
|
-
var
|
|
45
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
46
46
|
|
|
47
47
|
var renderCardImage = function renderCardImage(row, client) {
|
|
48
48
|
var imageHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
49
49
|
var imageWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
50
50
|
var imageMaxHeight = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
51
51
|
var imageFit = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
|
|
52
|
-
|
|
52
|
+
|
|
53
|
+
var url = urlFor({ client: client, source: row.thumbnail, imageHeight: imageHeight, imageWidth: imageWidth, imageMaxHeight: imageMaxHeight, imageFit: imageFit });
|
|
54
|
+
|
|
55
|
+
return url;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
var loadMore = function loadMore(values, setValues, itemsPerPage) {
|
|
59
|
+
console.log('Values:::', values);
|
|
60
|
+
setValues({
|
|
61
|
+
page: values.page + 1,
|
|
62
|
+
from: values.from + itemsPerPage,
|
|
63
|
+
to: values.to + itemsPerPage
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
var loadData = function loadData(values, query, client, params, setData, setScrolling, setLastDataSize, pointer, pointerArray) {
|
|
68
|
+
params = _extends._extends({}, params, {
|
|
69
|
+
from: values.from,
|
|
70
|
+
to: values.to
|
|
71
|
+
});
|
|
72
|
+
client.fetch(query, params).then(function (dataArr) {
|
|
73
|
+
if (pointer && pointerArray) {
|
|
74
|
+
dataArr = dataArr[pointerArray][pointer];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (!dataArr) {
|
|
78
|
+
dataArr = [];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
dataArr = dataArr.map(function (item) {
|
|
82
|
+
return _extends._extends({}, item, {
|
|
83
|
+
pageNumber: values.page
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
if (dataArr.length > 0) {
|
|
88
|
+
setData(function (prevData) {
|
|
89
|
+
return [].concat(toConsumableArray._toConsumableArray(prevData), toConsumableArray._toConsumableArray(dataArr));
|
|
90
|
+
});
|
|
91
|
+
setLastDataSize(dataArr.length);
|
|
92
|
+
setScrolling(true);
|
|
93
|
+
} else {
|
|
94
|
+
setLastDataSize(0);
|
|
95
|
+
setScrolling(false);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, itemIndex) {
|
|
101
|
+
if (seoPaginate) {
|
|
102
|
+
var path = router.asPath;
|
|
103
|
+
var qrIndex = path.indexOf('?');
|
|
104
|
+
var pathname = router.pathname;
|
|
105
|
+
var queryString = '';
|
|
106
|
+
|
|
107
|
+
if (qrIndex > 0) {
|
|
108
|
+
path = path.substring(1, qrIndex);
|
|
109
|
+
|
|
110
|
+
var partialQS = router.asPath.substring(qrIndex + 1);
|
|
111
|
+
var partialQSArr = partialQS.split('&');
|
|
112
|
+
|
|
113
|
+
// exclude page=xxx from query string
|
|
114
|
+
partialQSArr.map(function (item) {
|
|
115
|
+
var itemArr = item.split('=');
|
|
116
|
+
var key = itemArr[0];
|
|
117
|
+
var val = itemArr[1];
|
|
118
|
+
|
|
119
|
+
if (key !== 'page') {
|
|
120
|
+
queryString += (queryString.length === 0 ? '' : '&') + key + '=' + val;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (queryString.length > 0) {
|
|
126
|
+
path += '?' + queryString;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
pageNumber = parseInt(pageNumber);
|
|
130
|
+
// const index = Number(itemIndex)
|
|
131
|
+
// const perPage = Number(itemsPerPage)
|
|
132
|
+
|
|
133
|
+
// pageNumber = Math.ceil((index + 1) / perPage)
|
|
134
|
+
|
|
135
|
+
if (currentPage !== pageNumber) {
|
|
136
|
+
index$1.lib_3.refresh();
|
|
137
|
+
|
|
138
|
+
setCurrentPage(pageNumber);
|
|
139
|
+
if (path[0] !== '/') {
|
|
140
|
+
path = '/' + path;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
var newPath = pageNumber === 1 ? '' + path : '' + path + (queryString.length > 0 ? '&' : '?') + 'page=' + pageNumber;
|
|
144
|
+
|
|
145
|
+
// if (pageview) {
|
|
146
|
+
// pageview(newPath)
|
|
147
|
+
// }
|
|
148
|
+
|
|
149
|
+
router.push(pathname, newPath, {
|
|
150
|
+
shallow: true
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
53
154
|
};
|
|
54
155
|
|
|
55
156
|
var checkExternalUrl = function checkExternalUrl(url) {
|
|
56
157
|
return new RegExp(['http', 'https'].join('|')).test(url);
|
|
57
158
|
};
|
|
58
159
|
|
|
59
|
-
var
|
|
60
|
-
var data = _ref.data,
|
|
61
|
-
client = _ref.client,
|
|
62
|
-
mapping = _ref.mapping,
|
|
63
|
-
showPublished = _ref.showPublished,
|
|
64
|
-
defaultImage = _ref.defaultImage,
|
|
65
|
-
showAuthor = _ref.showAuthor,
|
|
66
|
-
showCategory = _ref.showCategory,
|
|
67
|
-
imageHeight = _ref.imageHeight,
|
|
68
|
-
imageWidth = _ref.imageWidth,
|
|
69
|
-
imageMaxHeight = _ref.imageMaxHeight,
|
|
70
|
-
imageFit = _ref.imageFit,
|
|
71
|
-
rightItems = _ref.rightItems,
|
|
72
|
-
brandInsightAd = _ref.brandInsightAd,
|
|
73
|
-
showBI = _ref.showBI,
|
|
74
|
-
heroContent = _ref.heroContent,
|
|
75
|
-
lgInfeedAd = _ref.lgInfeedAd,
|
|
76
|
-
showPubInfo = _ref.showPubInfo,
|
|
77
|
-
contentCategoryMapping = _ref.contentCategoryMapping,
|
|
78
|
-
showTimeDiff = _ref.showTimeDiff,
|
|
79
|
-
showTaxonomies = _ref.showTaxonomies,
|
|
80
|
-
showIntro = _ref.showIntro;
|
|
81
|
-
|
|
160
|
+
var cardLoader = function cardLoader(data, client, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, imageMaxHeight, imageFit, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd, showPubInfo, contentCategoryMapping, showTimeDiff, showTaxonomies, showIntro) {
|
|
82
161
|
var numberOfItemsBeforeAd = data.length < 6 ? data.length : 6;
|
|
83
162
|
var insertBrandInsightAd = function insertBrandInsightAd(arr, index, newElement) {
|
|
84
163
|
return [].concat(toConsumableArray._toConsumableArray(arr.slice(0, index)), [newElement], toConsumableArray._toConsumableArray(arr.slice(index)));
|
|
@@ -160,850 +239,425 @@ var CardLoader = function CardLoader(_ref) {
|
|
|
160
239
|
}
|
|
161
240
|
}
|
|
162
241
|
|
|
242
|
+
// 'articleCount' is New parameter to use instead of 'index' while passing to 'changePageNumber()'
|
|
243
|
+
// 'index' was including the indexes for infeed ads along with article count making the page number change before it reaches last article.
|
|
244
|
+
// 'articleCount' will be the indexes of only the articles in the deck.
|
|
245
|
+
var articleCount = -1;
|
|
163
246
|
data = data.map(function (ele, i) {
|
|
164
247
|
if (ele._type === 'lg-infeed') {
|
|
165
248
|
// Setting pos as top2 for the first occurence of large infeed ad
|
|
166
249
|
// const pos = data.indexOf(data.find((d) => d._type === 'lg-infeed')) === i ? 'top2' : `lg-infeed_${i}`
|
|
167
250
|
return _extends._extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends._extends({}, ele.targeting, { pos: 'lg-infeed' }) });
|
|
168
|
-
} else
|
|
251
|
+
} else if (ele._type === 'article') {
|
|
252
|
+
// incrementing 'articleCount' for each article.
|
|
253
|
+
++articleCount;
|
|
254
|
+
return _extends._extends({}, ele, { articleCount: articleCount });
|
|
255
|
+
} else {
|
|
256
|
+
return ele;
|
|
257
|
+
}
|
|
169
258
|
});
|
|
170
259
|
|
|
171
260
|
var featureCount = 0;
|
|
172
|
-
return React__default.createElement(
|
|
261
|
+
return React__default['default'].createElement(
|
|
173
262
|
'div',
|
|
174
263
|
null,
|
|
175
264
|
data && data.length > 0 ? dataRemapped ? // For Javascript Enabled Cases
|
|
176
|
-
data.map(function (article, index) {
|
|
265
|
+
data.map(function (article, index$1) {
|
|
266
|
+
var pageNumber = article.pageNumber || values.page;
|
|
177
267
|
var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
|
|
178
268
|
|
|
179
269
|
if (article._type === 'feature') {
|
|
180
270
|
featureCount++;
|
|
181
271
|
if (article.blank || checkExternalUrl(article.url.current)) {
|
|
182
|
-
return React__default.createElement(
|
|
183
|
-
|
|
272
|
+
return React__default['default'].createElement(
|
|
273
|
+
visibilitySensor.VisibilitySensor,
|
|
184
274
|
{
|
|
185
|
-
key: article._id ? article._id : index,
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
React__default.
|
|
192
|
-
index$1.LazyLoad,
|
|
193
|
-
{ height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
|
|
194
|
-
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), 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 })
|
|
195
|
-
),
|
|
196
|
-
article.source && React__default.createElement(
|
|
197
|
-
'div',
|
|
198
|
-
{ className: 'content-category-label' },
|
|
199
|
-
React__default.createElement(
|
|
200
|
-
'div',
|
|
201
|
-
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
202
|
-
article.source
|
|
203
|
-
)
|
|
204
|
-
)
|
|
205
|
-
),
|
|
206
|
-
React__default.createElement(
|
|
207
|
-
reactBootstrap.Media.Body,
|
|
275
|
+
key: article._id ? article._id : index$1,
|
|
276
|
+
partialVisibility: true,
|
|
277
|
+
onChange: function onChange(isVisible) {
|
|
278
|
+
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
|
|
279
|
+
} },
|
|
280
|
+
React__default['default'].createElement(
|
|
281
|
+
React__default['default'].Fragment,
|
|
208
282
|
null,
|
|
209
|
-
React__default.createElement(
|
|
210
|
-
|
|
211
|
-
{
|
|
212
|
-
|
|
213
|
-
'
|
|
214
|
-
{
|
|
215
|
-
|
|
216
|
-
)
|
|
217
|
-
),
|
|
218
|
-
showPublished && !showTimeDiff && article.published && React__default.createElement(
|
|
219
|
-
'p',
|
|
220
|
-
{ className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
|
|
221
|
-
moment.moment(article.published).format('MMMM DD, YYYY')
|
|
222
|
-
),
|
|
223
|
-
showTimeDiff && article.published && React__default.createElement(
|
|
224
|
-
'p',
|
|
225
|
-
{ className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
|
|
226
|
-
showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
|
|
227
|
-
if (index > 3) {
|
|
228
|
-
return null;
|
|
229
|
-
}
|
|
230
|
-
if (index === 3) {
|
|
231
|
-
return React__default.createElement(
|
|
232
|
-
React__default.Fragment,
|
|
233
|
-
null,
|
|
234
|
-
React__default.createElement(
|
|
235
|
-
'em',
|
|
236
|
-
{ style: { marginRight: '.5rem' } },
|
|
237
|
-
'...'
|
|
238
|
-
)
|
|
239
|
-
);
|
|
240
|
-
}
|
|
241
|
-
return React__default.createElement(
|
|
242
|
-
React__default.Fragment,
|
|
243
|
-
null,
|
|
244
|
-
React__default.createElement(
|
|
245
|
-
'em',
|
|
246
|
-
null,
|
|
247
|
-
taxonomy.name
|
|
248
|
-
),
|
|
249
|
-
' |',
|
|
250
|
-
' '
|
|
251
|
-
);
|
|
252
|
-
}),
|
|
253
|
-
' ',
|
|
254
|
-
React__default.createElement(
|
|
255
|
-
'span',
|
|
256
|
-
{ style: { display: 'inline-block' } },
|
|
257
|
-
timeDifferenceCalc(article.published)
|
|
258
|
-
)
|
|
259
|
-
),
|
|
260
|
-
showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
|
|
261
|
-
index$1.LazyLoad,
|
|
262
|
-
{ height: 50 },
|
|
263
|
-
React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
|
|
264
|
-
),
|
|
265
|
-
!article.thumbnail && !defaultImage && article.source && React__default.createElement(
|
|
266
|
-
'div',
|
|
267
|
-
{ className: 'content-category-label' },
|
|
268
|
-
React__default.createElement(
|
|
269
|
-
'div',
|
|
270
|
-
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
271
|
-
article.source
|
|
272
|
-
)
|
|
273
|
-
),
|
|
274
|
-
React__default.createElement(
|
|
275
|
-
'div',
|
|
276
|
-
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
277
|
-
showCategory && article.contentCategory && React__default.createElement(
|
|
278
|
-
'p',
|
|
279
|
-
{
|
|
280
|
-
className: 'article-category',
|
|
281
|
-
style: {
|
|
282
|
-
background: '#3FB618',
|
|
283
|
-
color: '#ffffff',
|
|
284
|
-
marginBottom: '.25rem',
|
|
285
|
-
display: 'inline-block',
|
|
286
|
-
padding: '0 .25rem',
|
|
287
|
-
fontSize: '.8rem'
|
|
288
|
-
} },
|
|
289
|
-
getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
|
|
290
|
-
),
|
|
291
|
-
article.issueSection && article.issueSection.name && React__default.createElement(
|
|
292
|
-
'p',
|
|
293
|
-
{
|
|
294
|
-
className: 'issueSection',
|
|
295
|
-
style: {
|
|
296
|
-
background: '#000000',
|
|
297
|
-
color: '#ffffff',
|
|
298
|
-
marginBottom: '.25rem',
|
|
299
|
-
marginLeft: '.25rem',
|
|
300
|
-
display: 'inline-block',
|
|
301
|
-
padding: '0 .25rem',
|
|
302
|
-
fontSize: '.8rem'
|
|
303
|
-
} },
|
|
304
|
-
article.issueSection.name
|
|
305
|
-
)
|
|
306
|
-
),
|
|
307
|
-
showPubInfo && (article.issue || article.volume) && React__default.createElement(
|
|
308
|
-
'div',
|
|
309
|
-
{ className: 'pubInfo' },
|
|
310
|
-
article.volume && React__default.createElement(
|
|
311
|
-
'p',
|
|
312
|
-
{ className: 'qdeVolume' },
|
|
313
|
-
article.volume
|
|
314
|
-
),
|
|
315
|
-
article.issue && React__default.createElement(
|
|
316
|
-
'p',
|
|
317
|
-
{ className: 'qdeIssue' },
|
|
318
|
-
article.issue
|
|
319
|
-
)
|
|
320
|
-
),
|
|
321
|
-
showIntro && article.summary && React__default.createElement(
|
|
322
|
-
'p',
|
|
323
|
-
{ className: 'pt-2 card-text' },
|
|
324
|
-
entities.clean_html_1(article.summary)
|
|
325
|
-
)
|
|
326
|
-
)
|
|
327
|
-
);
|
|
328
|
-
} else {
|
|
329
|
-
return React__default.createElement(
|
|
330
|
-
reactBootstrap.Media,
|
|
331
|
-
{
|
|
332
|
-
key: article._id ? article._id : index,
|
|
333
|
-
className: 'feature-media',
|
|
334
|
-
style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
335
|
-
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
336
|
-
'a',
|
|
337
|
-
{ href: article.url.current, className: 'feature-wrapper' },
|
|
338
|
-
React__default.createElement(
|
|
339
|
-
index$1.LazyLoad,
|
|
340
|
-
{ height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
|
|
341
|
-
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), 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 })
|
|
342
|
-
),
|
|
343
|
-
article.source && React__default.createElement(
|
|
344
|
-
'div',
|
|
345
|
-
{ className: 'content-category-label' },
|
|
346
|
-
React__default.createElement(
|
|
347
|
-
'div',
|
|
348
|
-
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
349
|
-
article.source
|
|
350
|
-
)
|
|
351
|
-
)
|
|
352
|
-
),
|
|
353
|
-
React__default.createElement(
|
|
354
|
-
reactBootstrap.Media.Body,
|
|
355
|
-
null,
|
|
356
|
-
React__default.createElement(
|
|
357
|
-
'a',
|
|
358
|
-
{ href: article.url.current },
|
|
359
|
-
article.title && React__default.createElement(
|
|
360
|
-
'h4',
|
|
361
|
-
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
362
|
-
article.title
|
|
363
|
-
)
|
|
364
|
-
),
|
|
365
|
-
showPublished && !showTimeDiff && article.published && React__default.createElement(
|
|
366
|
-
'p',
|
|
367
|
-
{ className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
|
|
368
|
-
moment.moment(article.published).format('MMMM DD, YYYY')
|
|
369
|
-
),
|
|
370
|
-
showTimeDiff && article.published && React__default.createElement(
|
|
371
|
-
'p',
|
|
372
|
-
{ className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
|
|
373
|
-
showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
|
|
374
|
-
if (index > 3) {
|
|
375
|
-
return null;
|
|
376
|
-
}
|
|
377
|
-
if (index === 3) {
|
|
378
|
-
return React__default.createElement(
|
|
379
|
-
React__default.Fragment,
|
|
380
|
-
null,
|
|
381
|
-
React__default.createElement(
|
|
382
|
-
'em',
|
|
383
|
-
{ style: { marginRight: '.5rem' } },
|
|
384
|
-
'...'
|
|
385
|
-
)
|
|
386
|
-
);
|
|
387
|
-
}
|
|
388
|
-
if (index === 3) {
|
|
389
|
-
return React__default.createElement(
|
|
390
|
-
React__default.Fragment,
|
|
391
|
-
null,
|
|
392
|
-
React__default.createElement(
|
|
393
|
-
'em',
|
|
394
|
-
{ style: { marginRight: '.5rem' } },
|
|
395
|
-
'...'
|
|
396
|
-
)
|
|
397
|
-
);
|
|
398
|
-
}
|
|
399
|
-
return React__default.createElement(
|
|
400
|
-
React__default.Fragment,
|
|
401
|
-
null,
|
|
402
|
-
React__default.createElement(
|
|
403
|
-
'em',
|
|
404
|
-
null,
|
|
405
|
-
taxonomy.name
|
|
406
|
-
),
|
|
407
|
-
' |',
|
|
408
|
-
' '
|
|
409
|
-
);
|
|
410
|
-
}),
|
|
411
|
-
' ',
|
|
412
|
-
React__default.createElement(
|
|
413
|
-
'span',
|
|
414
|
-
{ style: { display: 'inline-block' } },
|
|
415
|
-
timeDifferenceCalc(article.published)
|
|
416
|
-
)
|
|
417
|
-
),
|
|
418
|
-
showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
|
|
419
|
-
index$1.LazyLoad,
|
|
420
|
-
{ height: 50 },
|
|
421
|
-
React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
|
|
422
|
-
),
|
|
423
|
-
!article.thumbnail && !defaultImage && article.source && React__default.createElement(
|
|
424
|
-
'div',
|
|
425
|
-
{ className: 'content-category-label' },
|
|
426
|
-
React__default.createElement(
|
|
427
|
-
'div',
|
|
428
|
-
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
429
|
-
article.source
|
|
430
|
-
)
|
|
431
|
-
),
|
|
432
|
-
React__default.createElement(
|
|
433
|
-
'div',
|
|
434
|
-
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
435
|
-
showCategory && article.contentCategory && React__default.createElement(
|
|
436
|
-
'p',
|
|
437
|
-
{
|
|
438
|
-
className: 'article-category',
|
|
439
|
-
style: {
|
|
440
|
-
background: '#3FB618',
|
|
441
|
-
color: '#ffffff',
|
|
442
|
-
marginBottom: '.25rem',
|
|
443
|
-
display: 'inline-block',
|
|
444
|
-
padding: '0 .25rem',
|
|
445
|
-
fontSize: '.8rem'
|
|
446
|
-
} },
|
|
447
|
-
getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
|
|
448
|
-
),
|
|
449
|
-
article.issueSection && article.issueSection.name && React__default.createElement(
|
|
450
|
-
'p',
|
|
451
|
-
{
|
|
452
|
-
className: 'issueSection',
|
|
453
|
-
style: {
|
|
454
|
-
background: '#000000',
|
|
455
|
-
color: '#ffffff',
|
|
456
|
-
marginBottom: '.25rem',
|
|
457
|
-
marginLeft: '.25rem',
|
|
458
|
-
display: 'inline-block',
|
|
459
|
-
padding: '0 .25rem',
|
|
460
|
-
fontSize: '.8rem'
|
|
461
|
-
} },
|
|
462
|
-
article.issueSection.name
|
|
463
|
-
)
|
|
464
|
-
),
|
|
465
|
-
showPubInfo && (article.issue || article.volume) && React__default.createElement(
|
|
466
|
-
'div',
|
|
467
|
-
{ className: 'pubInfo' },
|
|
468
|
-
article.volume && React__default.createElement(
|
|
469
|
-
'p',
|
|
470
|
-
{ className: 'qdeVolume' },
|
|
471
|
-
article.volume
|
|
472
|
-
),
|
|
473
|
-
article.issue && React__default.createElement(
|
|
474
|
-
'p',
|
|
475
|
-
{ className: 'qdeIssue' },
|
|
476
|
-
article.issue
|
|
477
|
-
)
|
|
478
|
-
),
|
|
479
|
-
showIntro && article.summary && React__default.createElement(
|
|
480
|
-
'p',
|
|
481
|
-
{ className: 'pt-2 card-text' },
|
|
482
|
-
entities.clean_html_1(article.summary)
|
|
483
|
-
)
|
|
484
|
-
)
|
|
485
|
-
);
|
|
486
|
-
}
|
|
487
|
-
} else if (article._type === 'lg-infeed' && article.adUnit) {
|
|
488
|
-
return React__default.createElement(ADlgInfeed.ADlgInfeed, _extends._extends({ index: index }, article));
|
|
489
|
-
} else if (article._type === 'brandInsightAd' && article.adUnit) {
|
|
490
|
-
return React__default.createElement(ADInfeed.ADInfeed, { index: index, infeedAd: article });
|
|
491
|
-
}
|
|
492
|
-
if ((brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
|
|
493
|
-
return React__default.createElement(
|
|
494
|
-
React__default.Fragment,
|
|
495
|
-
{ key: article._id ? article._id : index },
|
|
496
|
-
React__default.createElement(
|
|
497
|
-
reactBootstrap.Media,
|
|
498
|
-
{
|
|
499
|
-
key: article._id ? article._id : index,
|
|
500
|
-
style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
501
|
-
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
502
|
-
'a',
|
|
503
|
-
{ href: mapping[contentCategoryName] + '/' + article.url.current, className: 'img-wrapper' },
|
|
504
|
-
React__default.createElement(
|
|
505
|
-
index$1.LazyLoad,
|
|
506
|
-
{ height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
|
|
507
|
-
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'mr-3 img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), 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 })
|
|
508
|
-
),
|
|
509
|
-
article.source && React__default.createElement(
|
|
510
|
-
'div',
|
|
511
|
-
{ className: 'content-category-label' },
|
|
512
|
-
React__default.createElement(
|
|
513
|
-
'div',
|
|
514
|
-
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
515
|
-
article.source
|
|
516
|
-
)
|
|
517
|
-
)
|
|
518
|
-
),
|
|
519
|
-
React__default.createElement(
|
|
520
|
-
reactBootstrap.Media.Body,
|
|
521
|
-
null,
|
|
522
|
-
React__default.createElement(
|
|
523
|
-
'a',
|
|
524
|
-
{ href: mapping[contentCategoryName] + '/' + article.url.current },
|
|
525
|
-
article.title && React__default.createElement(
|
|
526
|
-
'h4',
|
|
527
|
-
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
528
|
-
article.title
|
|
529
|
-
)
|
|
530
|
-
),
|
|
531
|
-
showPublished && !showTimeDiff && article.published && React__default.createElement(
|
|
532
|
-
'p',
|
|
533
|
-
{ className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
|
|
534
|
-
moment.moment(article.published).format('MMMM DD, YYYY')
|
|
535
|
-
),
|
|
536
|
-
showTimeDiff && article.published && React__default.createElement(
|
|
537
|
-
'p',
|
|
538
|
-
{ className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
|
|
539
|
-
showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
|
|
540
|
-
if (index > 3) {
|
|
541
|
-
return null;
|
|
542
|
-
}
|
|
543
|
-
if (index === 3) {
|
|
544
|
-
return React__default.createElement(
|
|
545
|
-
React__default.Fragment,
|
|
546
|
-
null,
|
|
547
|
-
React__default.createElement(
|
|
548
|
-
'em',
|
|
549
|
-
{ style: { marginRight: '.5rem' } },
|
|
550
|
-
'...'
|
|
551
|
-
)
|
|
552
|
-
);
|
|
553
|
-
}
|
|
554
|
-
return React__default.createElement(
|
|
555
|
-
React__default.Fragment,
|
|
556
|
-
null,
|
|
557
|
-
React__default.createElement(
|
|
558
|
-
'em',
|
|
559
|
-
null,
|
|
560
|
-
taxonomy.name
|
|
561
|
-
),
|
|
562
|
-
' |',
|
|
563
|
-
' '
|
|
564
|
-
);
|
|
565
|
-
}),
|
|
566
|
-
' ',
|
|
567
|
-
React__default.createElement(
|
|
568
|
-
'span',
|
|
569
|
-
{ style: { display: 'inline-block' } },
|
|
570
|
-
timeDifferenceCalc(article.published)
|
|
571
|
-
)
|
|
572
|
-
),
|
|
573
|
-
React__default.createElement(
|
|
574
|
-
'div',
|
|
575
|
-
{ className: 'author-sec', style: { lineHeight: 1.5 } },
|
|
576
|
-
showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
|
|
577
|
-
index$1.LazyLoad,
|
|
578
|
-
{ height: 50 },
|
|
579
|
-
React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
|
|
580
|
-
)
|
|
581
|
-
),
|
|
582
|
-
!article.thumbnail && !defaultImage && article.source && React__default.createElement(
|
|
583
|
-
'div',
|
|
584
|
-
{ className: 'content-category-label' },
|
|
585
|
-
React__default.createElement(
|
|
586
|
-
'div',
|
|
587
|
-
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
588
|
-
article.source
|
|
589
|
-
)
|
|
590
|
-
),
|
|
591
|
-
React__default.createElement(
|
|
592
|
-
'div',
|
|
593
|
-
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
594
|
-
showCategory && article.contentCategory && React__default.createElement(
|
|
595
|
-
'p',
|
|
596
|
-
{
|
|
597
|
-
className: 'article-category',
|
|
598
|
-
style: {
|
|
599
|
-
background: '#3FB618',
|
|
600
|
-
color: '#ffffff',
|
|
601
|
-
marginBottom: '.25rem',
|
|
602
|
-
display: 'inline-block',
|
|
603
|
-
padding: '0 .25rem',
|
|
604
|
-
fontSize: '.8rem'
|
|
605
|
-
} },
|
|
606
|
-
getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
|
|
607
|
-
),
|
|
608
|
-
article.issueSection && article.issueSection.name && React__default.createElement(
|
|
609
|
-
'p',
|
|
610
|
-
{
|
|
611
|
-
className: 'issueSection',
|
|
612
|
-
style: {
|
|
613
|
-
background: '#000000',
|
|
614
|
-
color: '#ffffff',
|
|
615
|
-
marginBottom: '.25rem',
|
|
616
|
-
marginLeft: '.25rem',
|
|
617
|
-
display: 'inline-block',
|
|
618
|
-
padding: '0 .25rem',
|
|
619
|
-
fontSize: '.8rem'
|
|
620
|
-
} },
|
|
621
|
-
article.issueSection.name
|
|
622
|
-
)
|
|
623
|
-
),
|
|
624
|
-
showPubInfo && (article.issue || article.volume) && React__default.createElement(
|
|
625
|
-
'div',
|
|
626
|
-
{ className: 'pubInfo' },
|
|
627
|
-
article.volume && React__default.createElement(
|
|
628
|
-
'p',
|
|
629
|
-
{ className: 'qdeVolume' },
|
|
630
|
-
article.volume
|
|
631
|
-
),
|
|
632
|
-
article.issue && React__default.createElement(
|
|
633
|
-
'p',
|
|
634
|
-
{ className: 'qdeIssue' },
|
|
635
|
-
article.issue
|
|
636
|
-
)
|
|
637
|
-
),
|
|
638
|
-
showIntro && article.summary && React__default.createElement(
|
|
639
|
-
'p',
|
|
640
|
-
{ className: 'pt-2 card-text' },
|
|
641
|
-
entities.clean_html_1(article.summary)
|
|
642
|
-
)
|
|
643
|
-
)
|
|
644
|
-
),
|
|
645
|
-
React__default.createElement(
|
|
646
|
-
'div',
|
|
647
|
-
null,
|
|
648
|
-
main.main_36 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
|
|
649
|
-
)
|
|
650
|
-
);
|
|
651
|
-
} else return null;
|
|
652
|
-
}) :
|
|
653
|
-
// For Javascript Disabled Cases
|
|
654
|
-
React__default.createElement(
|
|
655
|
-
'noscript',
|
|
656
|
-
null,
|
|
657
|
-
data.map(function (article, index) {
|
|
658
|
-
var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
|
|
659
|
-
|
|
660
|
-
if (article._type === 'feature') {
|
|
661
|
-
featureCount++;
|
|
662
|
-
if (article.blank || checkExternalUrl(article.url.current)) {
|
|
663
|
-
return React__default.createElement(
|
|
664
|
-
reactBootstrap.Media,
|
|
665
|
-
{
|
|
666
|
-
key: article._id ? article._id : index,
|
|
667
|
-
className: 'feature-media',
|
|
668
|
-
style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
669
|
-
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
670
|
-
'a',
|
|
671
|
-
{ rel: 'noopener', href: article.url.current, target: '_blank', className: 'feature-wrapper' },
|
|
672
|
-
React__default.createElement(
|
|
673
|
-
index$1.LazyLoad,
|
|
674
|
-
{ height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
|
|
675
|
-
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), 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 })
|
|
676
|
-
),
|
|
677
|
-
article.source && React__default.createElement(
|
|
678
|
-
'div',
|
|
679
|
-
{ className: 'content-category-label' },
|
|
680
|
-
React__default.createElement(
|
|
681
|
-
'div',
|
|
682
|
-
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
683
|
-
article.source
|
|
684
|
-
)
|
|
685
|
-
)
|
|
686
|
-
),
|
|
687
|
-
React__default.createElement(
|
|
688
|
-
reactBootstrap.Media.Body,
|
|
689
|
-
null,
|
|
690
|
-
React__default.createElement(
|
|
283
|
+
React__default['default'].createElement(
|
|
284
|
+
reactBootstrap.Media,
|
|
285
|
+
{
|
|
286
|
+
key: article._id ? article._id : index$1,
|
|
287
|
+
className: 'feature-media',
|
|
288
|
+
style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
289
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default['default'].createElement(
|
|
691
290
|
'a',
|
|
692
|
-
{ rel: 'noopener', href: article.url.current, target: '_blank' },
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
{
|
|
696
|
-
article.title
|
|
697
|
-
)
|
|
698
|
-
|
|
699
|
-
showPublished && article.published && React__default.createElement(
|
|
700
|
-
'p',
|
|
701
|
-
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
702
|
-
moment.moment(article.published).format('MMMM DD, YYYY')
|
|
703
|
-
),
|
|
704
|
-
showTimeDiff && article.published && React__default.createElement(
|
|
705
|
-
'p',
|
|
706
|
-
{ className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
|
|
707
|
-
showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
|
|
708
|
-
if (index > 3) {
|
|
709
|
-
return null;
|
|
710
|
-
}
|
|
711
|
-
if (index === 3) {
|
|
712
|
-
return React__default.createElement(
|
|
713
|
-
React__default.Fragment,
|
|
714
|
-
null,
|
|
715
|
-
React__default.createElement(
|
|
716
|
-
'em',
|
|
717
|
-
{ style: { marginRight: '.5rem' } },
|
|
718
|
-
'...'
|
|
719
|
-
)
|
|
720
|
-
);
|
|
721
|
-
}
|
|
722
|
-
return React__default.createElement(
|
|
723
|
-
React__default.Fragment,
|
|
724
|
-
null,
|
|
725
|
-
React__default.createElement(
|
|
726
|
-
'em',
|
|
727
|
-
null,
|
|
728
|
-
taxonomy.name
|
|
729
|
-
),
|
|
730
|
-
' |',
|
|
731
|
-
' '
|
|
732
|
-
);
|
|
733
|
-
}),
|
|
734
|
-
' ',
|
|
735
|
-
React__default.createElement(
|
|
736
|
-
'span',
|
|
737
|
-
{ style: { display: 'inline-block' } },
|
|
738
|
-
timeDifferenceCalc(article.published)
|
|
739
|
-
)
|
|
740
|
-
),
|
|
741
|
-
showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
|
|
742
|
-
index$1.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: 'content-category-label' },
|
|
749
|
-
React__default.createElement(
|
|
291
|
+
{ rel: 'noopener', href: article.url.current, target: '_blank', className: 'feature-wrapper' },
|
|
292
|
+
React__default['default'].createElement(
|
|
293
|
+
index.LazyLoad,
|
|
294
|
+
{ height: imageHeight, placeholder: React__default['default'].createElement(ImagePlaceholder, null) },
|
|
295
|
+
article.thumbnail && article.thumbnail.asset ? React__default['default'].createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default['default'].createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default['default'].createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
|
|
296
|
+
),
|
|
297
|
+
article.source && React__default['default'].createElement(
|
|
750
298
|
'div',
|
|
751
|
-
{ className: '
|
|
752
|
-
|
|
299
|
+
{ className: 'content-category-label' },
|
|
300
|
+
React__default['default'].createElement(
|
|
301
|
+
'div',
|
|
302
|
+
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
303
|
+
article.source
|
|
304
|
+
)
|
|
753
305
|
)
|
|
754
306
|
),
|
|
755
|
-
React__default.createElement(
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
'
|
|
760
|
-
{
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
display: 'inline-block',
|
|
767
|
-
padding: '0 .25rem',
|
|
768
|
-
fontSize: '.8rem'
|
|
769
|
-
} },
|
|
770
|
-
getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
|
|
307
|
+
React__default['default'].createElement(
|
|
308
|
+
reactBootstrap.Media.Body,
|
|
309
|
+
null,
|
|
310
|
+
React__default['default'].createElement(
|
|
311
|
+
'a',
|
|
312
|
+
{ rel: 'noopener', href: article.url.current, target: '_blank' },
|
|
313
|
+
article.title && React__default['default'].createElement(
|
|
314
|
+
'h4',
|
|
315
|
+
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
316
|
+
article.title
|
|
317
|
+
)
|
|
771
318
|
),
|
|
772
|
-
|
|
773
|
-
'p',
|
|
774
|
-
{
|
|
775
|
-
className: 'issueSection',
|
|
776
|
-
style: {
|
|
777
|
-
background: '#000000',
|
|
778
|
-
color: '#ffffff',
|
|
779
|
-
marginBottom: '.25rem',
|
|
780
|
-
marginLeft: '.25rem',
|
|
781
|
-
display: 'inline-block',
|
|
782
|
-
padding: '0 .25rem',
|
|
783
|
-
fontSize: '.8rem'
|
|
784
|
-
} },
|
|
785
|
-
article.issueSection.name
|
|
786
|
-
)
|
|
787
|
-
),
|
|
788
|
-
showPubInfo && (article.issue || article.volume) && React__default.createElement(
|
|
789
|
-
'div',
|
|
790
|
-
{ className: 'pubInfo' },
|
|
791
|
-
article.volume && React__default.createElement(
|
|
319
|
+
showPublished && !showTimeDiff && article.published && React__default['default'].createElement(
|
|
792
320
|
'p',
|
|
793
|
-
{ className: '
|
|
794
|
-
article.
|
|
321
|
+
{ className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
|
|
322
|
+
moment.moment(article.published).format('MMMM DD, YYYY')
|
|
795
323
|
),
|
|
796
|
-
article.
|
|
324
|
+
showTimeDiff && article.published && React__default['default'].createElement(
|
|
797
325
|
'p',
|
|
798
|
-
{ className: '
|
|
799
|
-
article.
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
817
|
-
'a',
|
|
818
|
-
{ href: article.url.current, className: 'feature-wrapper' },
|
|
819
|
-
React__default.createElement(
|
|
820
|
-
index$1.LazyLoad,
|
|
821
|
-
{ height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
|
|
822
|
-
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), 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 })
|
|
823
|
-
),
|
|
824
|
-
article.source && React__default.createElement(
|
|
825
|
-
'div',
|
|
826
|
-
{ className: 'content-category-label' },
|
|
827
|
-
React__default.createElement(
|
|
828
|
-
'div',
|
|
829
|
-
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
830
|
-
article.source
|
|
831
|
-
)
|
|
832
|
-
)
|
|
833
|
-
),
|
|
834
|
-
React__default.createElement(
|
|
835
|
-
reactBootstrap.Media.Body,
|
|
836
|
-
null,
|
|
837
|
-
React__default.createElement(
|
|
838
|
-
'a',
|
|
839
|
-
{ href: 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
|
-
showTimeDiff && article.published && React__default.createElement(
|
|
852
|
-
'p',
|
|
853
|
-
{ className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
|
|
854
|
-
showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
|
|
855
|
-
if (index > 3) {
|
|
856
|
-
return null;
|
|
857
|
-
}
|
|
858
|
-
if (index === 3) {
|
|
859
|
-
return React__default.createElement(
|
|
860
|
-
React__default.Fragment,
|
|
326
|
+
{ className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
|
|
327
|
+
showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
|
|
328
|
+
if (index > 3) {
|
|
329
|
+
return null;
|
|
330
|
+
}
|
|
331
|
+
if (index === 3) {
|
|
332
|
+
return React__default['default'].createElement(
|
|
333
|
+
React__default['default'].Fragment,
|
|
334
|
+
null,
|
|
335
|
+
React__default['default'].createElement(
|
|
336
|
+
'em',
|
|
337
|
+
{ style: { marginRight: '.5rem' } },
|
|
338
|
+
'...'
|
|
339
|
+
)
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
return React__default['default'].createElement(
|
|
343
|
+
React__default['default'].Fragment,
|
|
861
344
|
null,
|
|
862
|
-
React__default.createElement(
|
|
345
|
+
React__default['default'].createElement(
|
|
863
346
|
'em',
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
)
|
|
347
|
+
null,
|
|
348
|
+
taxonomy.name
|
|
349
|
+
),
|
|
350
|
+
' |',
|
|
351
|
+
' '
|
|
867
352
|
);
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
)
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
'
|
|
884
|
-
|
|
885
|
-
|
|
353
|
+
}),
|
|
354
|
+
' ',
|
|
355
|
+
React__default['default'].createElement(
|
|
356
|
+
'span',
|
|
357
|
+
{ style: { display: 'inline-block' } },
|
|
358
|
+
timeDifferenceCalc(article.published)
|
|
359
|
+
)
|
|
360
|
+
),
|
|
361
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default['default'].createElement(
|
|
362
|
+
index.LazyLoad,
|
|
363
|
+
{ height: 50 },
|
|
364
|
+
React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: index$1.toString(), index: index$1, authors: article.authorMapping })
|
|
365
|
+
),
|
|
366
|
+
!article.thumbnail && !defaultImage && article.source && React__default['default'].createElement(
|
|
367
|
+
'div',
|
|
368
|
+
{ className: 'content-category-label' },
|
|
369
|
+
React__default['default'].createElement(
|
|
370
|
+
'div',
|
|
371
|
+
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
372
|
+
article.source
|
|
373
|
+
)
|
|
374
|
+
),
|
|
375
|
+
React__default['default'].createElement(
|
|
376
|
+
'div',
|
|
377
|
+
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
378
|
+
showCategory && article.contentCategory && React__default['default'].createElement(
|
|
379
|
+
'p',
|
|
380
|
+
{
|
|
381
|
+
className: 'article-category',
|
|
382
|
+
style: {
|
|
383
|
+
background: '#3FB618',
|
|
384
|
+
color: '#ffffff',
|
|
385
|
+
marginBottom: '.25rem',
|
|
386
|
+
display: 'inline-block',
|
|
387
|
+
padding: '0 .25rem',
|
|
388
|
+
fontSize: '.8rem'
|
|
389
|
+
} },
|
|
390
|
+
getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
|
|
391
|
+
),
|
|
392
|
+
article.issueSection && article.issueSection.name && React__default['default'].createElement(
|
|
393
|
+
'p',
|
|
394
|
+
{
|
|
395
|
+
className: 'issueSection',
|
|
396
|
+
style: {
|
|
397
|
+
background: '#000000',
|
|
398
|
+
color: '#ffffff',
|
|
399
|
+
marginBottom: '.25rem',
|
|
400
|
+
marginLeft: '.25rem',
|
|
401
|
+
display: 'inline-block',
|
|
402
|
+
padding: '0 .25rem',
|
|
403
|
+
fontSize: '.8rem'
|
|
404
|
+
} },
|
|
405
|
+
article.issueSection.name
|
|
406
|
+
)
|
|
407
|
+
),
|
|
408
|
+
showPubInfo && (article.issue || article.volume) && React__default['default'].createElement(
|
|
409
|
+
'div',
|
|
410
|
+
{ className: 'pubInfo' },
|
|
411
|
+
article.volume && React__default['default'].createElement(
|
|
412
|
+
'p',
|
|
413
|
+
{ className: 'qdeVolume' },
|
|
414
|
+
article.volume
|
|
415
|
+
),
|
|
416
|
+
article.issue && React__default['default'].createElement(
|
|
417
|
+
'p',
|
|
418
|
+
{ className: 'qdeIssue' },
|
|
419
|
+
article.issue
|
|
420
|
+
)
|
|
421
|
+
),
|
|
422
|
+
showIntro && article.summary && React__default['default'].createElement(
|
|
423
|
+
'p',
|
|
424
|
+
{ className: 'pt-2 card-text' },
|
|
425
|
+
entities.clean_html_1(article.summary)
|
|
886
426
|
)
|
|
887
|
-
)
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
427
|
+
)
|
|
428
|
+
)
|
|
429
|
+
)
|
|
430
|
+
);
|
|
431
|
+
} else {
|
|
432
|
+
return React__default['default'].createElement(
|
|
433
|
+
visibilitySensor.VisibilitySensor,
|
|
434
|
+
{
|
|
435
|
+
key: article._id ? article._id : index$1,
|
|
436
|
+
partialVisibility: true,
|
|
437
|
+
onChange: function onChange(isVisible) {
|
|
438
|
+
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
|
|
439
|
+
} },
|
|
440
|
+
React__default['default'].createElement(
|
|
441
|
+
React__default['default'].Fragment,
|
|
442
|
+
null,
|
|
443
|
+
React__default['default'].createElement(
|
|
444
|
+
reactBootstrap.Media,
|
|
445
|
+
{
|
|
446
|
+
key: article._id ? article._id : index$1,
|
|
447
|
+
className: 'feature-media',
|
|
448
|
+
style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
449
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default['default'].createElement(
|
|
450
|
+
'a',
|
|
451
|
+
{ href: article.url.current, className: 'feature-wrapper' },
|
|
452
|
+
React__default['default'].createElement(
|
|
453
|
+
index.LazyLoad,
|
|
454
|
+
{ height: imageHeight, placeholder: React__default['default'].createElement(ImagePlaceholder, null) },
|
|
455
|
+
article.thumbnail && article.thumbnail.asset ? React__default['default'].createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default['default'].createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default['default'].createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
|
|
456
|
+
),
|
|
457
|
+
article.source && React__default['default'].createElement(
|
|
897
458
|
'div',
|
|
898
|
-
{ className: '
|
|
899
|
-
|
|
459
|
+
{ className: 'content-category-label' },
|
|
460
|
+
React__default['default'].createElement(
|
|
461
|
+
'div',
|
|
462
|
+
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
463
|
+
article.source
|
|
464
|
+
)
|
|
900
465
|
)
|
|
901
466
|
),
|
|
902
|
-
React__default.createElement(
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
'
|
|
907
|
-
{
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
display: 'inline-block',
|
|
914
|
-
padding: '0 .25rem',
|
|
915
|
-
fontSize: '.8rem'
|
|
916
|
-
} },
|
|
917
|
-
getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
|
|
467
|
+
React__default['default'].createElement(
|
|
468
|
+
reactBootstrap.Media.Body,
|
|
469
|
+
null,
|
|
470
|
+
React__default['default'].createElement(
|
|
471
|
+
'a',
|
|
472
|
+
{ href: article.url.current },
|
|
473
|
+
article.title && React__default['default'].createElement(
|
|
474
|
+
'h4',
|
|
475
|
+
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
476
|
+
article.title
|
|
477
|
+
)
|
|
918
478
|
),
|
|
919
|
-
|
|
479
|
+
showPublished && !showTimeDiff && article.published && React__default['default'].createElement(
|
|
920
480
|
'p',
|
|
921
|
-
{
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
color: '#ffffff',
|
|
926
|
-
marginBottom: '.25rem',
|
|
927
|
-
marginLeft: '.25rem',
|
|
928
|
-
display: 'inline-block',
|
|
929
|
-
padding: '0 .25rem',
|
|
930
|
-
fontSize: '.8rem'
|
|
931
|
-
} },
|
|
932
|
-
article.issueSection.name
|
|
933
|
-
)
|
|
934
|
-
),
|
|
935
|
-
showPubInfo && (article.issue || article.volume) && React__default.createElement(
|
|
936
|
-
'div',
|
|
937
|
-
{ className: 'pubInfo' },
|
|
938
|
-
article.volume && React__default.createElement(
|
|
481
|
+
{ className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
|
|
482
|
+
moment.moment(article.published).format('MMMM DD, YYYY')
|
|
483
|
+
),
|
|
484
|
+
showTimeDiff && article.published && React__default['default'].createElement(
|
|
939
485
|
'p',
|
|
940
|
-
{ className: '
|
|
941
|
-
article.
|
|
486
|
+
{ className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
|
|
487
|
+
showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
|
|
488
|
+
if (index > 3) {
|
|
489
|
+
return null;
|
|
490
|
+
}
|
|
491
|
+
if (index === 3) {
|
|
492
|
+
return React__default['default'].createElement(
|
|
493
|
+
React__default['default'].Fragment,
|
|
494
|
+
null,
|
|
495
|
+
React__default['default'].createElement(
|
|
496
|
+
'em',
|
|
497
|
+
{ style: { marginRight: '.5rem' } },
|
|
498
|
+
'...'
|
|
499
|
+
)
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
if (index === 3) {
|
|
503
|
+
return React__default['default'].createElement(
|
|
504
|
+
React__default['default'].Fragment,
|
|
505
|
+
null,
|
|
506
|
+
React__default['default'].createElement(
|
|
507
|
+
'em',
|
|
508
|
+
{ style: { marginRight: '.5rem' } },
|
|
509
|
+
'...'
|
|
510
|
+
)
|
|
511
|
+
);
|
|
512
|
+
}
|
|
513
|
+
return React__default['default'].createElement(
|
|
514
|
+
React__default['default'].Fragment,
|
|
515
|
+
null,
|
|
516
|
+
React__default['default'].createElement(
|
|
517
|
+
'em',
|
|
518
|
+
null,
|
|
519
|
+
taxonomy.name
|
|
520
|
+
),
|
|
521
|
+
' |',
|
|
522
|
+
' '
|
|
523
|
+
);
|
|
524
|
+
}),
|
|
525
|
+
' ',
|
|
526
|
+
React__default['default'].createElement(
|
|
527
|
+
'span',
|
|
528
|
+
{ style: { display: 'inline-block' } },
|
|
529
|
+
timeDifferenceCalc(article.published)
|
|
530
|
+
)
|
|
531
|
+
),
|
|
532
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default['default'].createElement(
|
|
533
|
+
index.LazyLoad,
|
|
534
|
+
{ height: 50 },
|
|
535
|
+
React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: index$1.toString(), index: index$1, authors: article.authorMapping })
|
|
536
|
+
),
|
|
537
|
+
!article.thumbnail && !defaultImage && article.source && React__default['default'].createElement(
|
|
538
|
+
'div',
|
|
539
|
+
{ className: 'content-category-label' },
|
|
540
|
+
React__default['default'].createElement(
|
|
541
|
+
'div',
|
|
542
|
+
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
543
|
+
article.source
|
|
544
|
+
)
|
|
942
545
|
),
|
|
943
|
-
|
|
546
|
+
React__default['default'].createElement(
|
|
547
|
+
'div',
|
|
548
|
+
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
549
|
+
showCategory && article.contentCategory && React__default['default'].createElement(
|
|
550
|
+
'p',
|
|
551
|
+
{
|
|
552
|
+
className: 'article-category',
|
|
553
|
+
style: {
|
|
554
|
+
background: '#3FB618',
|
|
555
|
+
color: '#ffffff',
|
|
556
|
+
marginBottom: '.25rem',
|
|
557
|
+
display: 'inline-block',
|
|
558
|
+
padding: '0 .25rem',
|
|
559
|
+
fontSize: '.8rem'
|
|
560
|
+
} },
|
|
561
|
+
getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
|
|
562
|
+
),
|
|
563
|
+
article.issueSection && article.issueSection.name && React__default['default'].createElement(
|
|
564
|
+
'p',
|
|
565
|
+
{
|
|
566
|
+
className: 'issueSection',
|
|
567
|
+
style: {
|
|
568
|
+
background: '#000000',
|
|
569
|
+
color: '#ffffff',
|
|
570
|
+
marginBottom: '.25rem',
|
|
571
|
+
marginLeft: '.25rem',
|
|
572
|
+
display: 'inline-block',
|
|
573
|
+
padding: '0 .25rem',
|
|
574
|
+
fontSize: '.8rem'
|
|
575
|
+
} },
|
|
576
|
+
article.issueSection.name
|
|
577
|
+
)
|
|
578
|
+
),
|
|
579
|
+
showPubInfo && (article.issue || article.volume) && React__default['default'].createElement(
|
|
580
|
+
'div',
|
|
581
|
+
{ className: 'pubInfo' },
|
|
582
|
+
article.volume && React__default['default'].createElement(
|
|
583
|
+
'p',
|
|
584
|
+
{ className: 'qdeVolume' },
|
|
585
|
+
article.volume
|
|
586
|
+
),
|
|
587
|
+
article.issue && React__default['default'].createElement(
|
|
588
|
+
'p',
|
|
589
|
+
{ className: 'qdeIssue' },
|
|
590
|
+
article.issue
|
|
591
|
+
)
|
|
592
|
+
),
|
|
593
|
+
showIntro && article.summary && React__default['default'].createElement(
|
|
944
594
|
'p',
|
|
945
|
-
{ className: '
|
|
946
|
-
article.
|
|
595
|
+
{ className: 'pt-2 card-text' },
|
|
596
|
+
entities.clean_html_1(article.summary)
|
|
947
597
|
)
|
|
948
|
-
),
|
|
949
|
-
showIntro && article.summary && React__default.createElement(
|
|
950
|
-
'p',
|
|
951
|
-
{ className: 'pt-2 card-text' },
|
|
952
|
-
entities.clean_html_1(article.summary)
|
|
953
598
|
)
|
|
954
599
|
)
|
|
955
|
-
)
|
|
956
|
-
|
|
957
|
-
} else if (article._type === 'lg-infeed' && article.adUnit) {
|
|
958
|
-
return React__default.createElement(ADlgInfeed.ADlgInfeed, _extends._extends({ index: index }, article));
|
|
959
|
-
} else if (article._type === 'brandInsightAd' && article.adUnit) {
|
|
960
|
-
return React__default.createElement(ADInfeed.ADInfeed, { index: index, infeedAd: article });
|
|
600
|
+
)
|
|
601
|
+
);
|
|
961
602
|
}
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
603
|
+
} else if (article._type === 'lg-infeed' && article.adUnit) {
|
|
604
|
+
return React__default['default'].createElement(ADlgInfeed.ADlgInfeed, _extends._extends({ index: index$1 }, article));
|
|
605
|
+
} else if (article._type === 'brandInsightAd' && article.adUnit) {
|
|
606
|
+
return React__default['default'].createElement(ADInfeed.ADInfeed, { index: index$1, infeedAd: article });
|
|
607
|
+
}
|
|
608
|
+
if ((brandInsightAd ? index$1 > heroContent + featureCount : index$1 + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
|
|
609
|
+
return React__default['default'].createElement(
|
|
610
|
+
visibilitySensor.VisibilitySensor,
|
|
611
|
+
{
|
|
612
|
+
key: article._id ? article._id : index$1,
|
|
613
|
+
onChange: function onChange(isVisible) {
|
|
614
|
+
// Passing 'articleCount' instead of index because index will be including the indexes of ads whereas articleCount will be having index of artilce only.
|
|
615
|
+
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, article.articleCount ? article.articleCount : index$1);
|
|
616
|
+
} },
|
|
617
|
+
React__default['default'].createElement(
|
|
618
|
+
React__default['default'].Fragment,
|
|
619
|
+
null,
|
|
620
|
+
React__default['default'].createElement(
|
|
967
621
|
reactBootstrap.Media,
|
|
968
622
|
{
|
|
969
|
-
key: article._id ? article._id : index,
|
|
623
|
+
key: article._id ? article._id : index$1,
|
|
970
624
|
style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
971
|
-
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
625
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default['default'].createElement(
|
|
972
626
|
'a',
|
|
973
627
|
{ href: mapping[contentCategoryName] + '/' + article.url.current, className: 'img-wrapper' },
|
|
974
|
-
React__default.createElement(
|
|
975
|
-
index
|
|
976
|
-
{ height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
|
|
977
|
-
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'mr-3 img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), 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 })
|
|
628
|
+
React__default['default'].createElement(
|
|
629
|
+
index.LazyLoad,
|
|
630
|
+
{ height: imageHeight, placeholder: React__default['default'].createElement(ImagePlaceholder, null) },
|
|
631
|
+
article.thumbnail && article.thumbnail.asset ? React__default['default'].createElement('img', { className: 'mr-3 img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default['default'].createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default['default'].createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
|
|
978
632
|
),
|
|
979
|
-
article.source && React__default.createElement(
|
|
633
|
+
article.source && React__default['default'].createElement(
|
|
980
634
|
'div',
|
|
981
635
|
{ className: 'content-category-label' },
|
|
982
|
-
React__default.createElement(
|
|
636
|
+
React__default['default'].createElement(
|
|
983
637
|
'div',
|
|
984
638
|
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
985
639
|
article.source
|
|
986
640
|
)
|
|
987
641
|
)
|
|
988
642
|
),
|
|
989
|
-
React__default.createElement(
|
|
643
|
+
React__default['default'].createElement(
|
|
990
644
|
reactBootstrap.Media.Body,
|
|
991
645
|
null,
|
|
992
|
-
React__default.createElement(
|
|
646
|
+
React__default['default'].createElement(
|
|
993
647
|
'a',
|
|
994
648
|
{ href: mapping[contentCategoryName] + '/' + article.url.current },
|
|
995
|
-
article.title && React__default.createElement(
|
|
649
|
+
article.title && React__default['default'].createElement(
|
|
996
650
|
'h4',
|
|
997
651
|
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
998
652
|
article.title
|
|
999
653
|
)
|
|
1000
654
|
),
|
|
1001
|
-
showPublished && article.published && React__default.createElement(
|
|
655
|
+
showPublished && !showTimeDiff && article.published && React__default['default'].createElement(
|
|
1002
656
|
'p',
|
|
1003
|
-
{ className: 'card-text', style: { color: 'var(--dark)',
|
|
657
|
+
{ className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
|
|
1004
658
|
moment.moment(article.published).format('MMMM DD, YYYY')
|
|
1005
659
|
),
|
|
1006
|
-
showTimeDiff && article.published && React__default.createElement(
|
|
660
|
+
showTimeDiff && article.published && React__default['default'].createElement(
|
|
1007
661
|
'p',
|
|
1008
662
|
{ className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
|
|
1009
663
|
showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
|
|
@@ -1011,20 +665,20 @@ var CardLoader = function CardLoader(_ref) {
|
|
|
1011
665
|
return null;
|
|
1012
666
|
}
|
|
1013
667
|
if (index === 3) {
|
|
1014
|
-
return React__default.createElement(
|
|
1015
|
-
React__default.Fragment,
|
|
668
|
+
return React__default['default'].createElement(
|
|
669
|
+
React__default['default'].Fragment,
|
|
1016
670
|
null,
|
|
1017
|
-
React__default.createElement(
|
|
671
|
+
React__default['default'].createElement(
|
|
1018
672
|
'em',
|
|
1019
673
|
{ style: { marginRight: '.5rem' } },
|
|
1020
674
|
'...'
|
|
1021
675
|
)
|
|
1022
676
|
);
|
|
1023
677
|
}
|
|
1024
|
-
return React__default.createElement(
|
|
1025
|
-
React__default.Fragment,
|
|
678
|
+
return React__default['default'].createElement(
|
|
679
|
+
React__default['default'].Fragment,
|
|
1026
680
|
null,
|
|
1027
|
-
React__default.createElement(
|
|
681
|
+
React__default['default'].createElement(
|
|
1028
682
|
'em',
|
|
1029
683
|
null,
|
|
1030
684
|
taxonomy.name
|
|
@@ -1034,34 +688,34 @@ var CardLoader = function CardLoader(_ref) {
|
|
|
1034
688
|
);
|
|
1035
689
|
}),
|
|
1036
690
|
' ',
|
|
1037
|
-
React__default.createElement(
|
|
691
|
+
React__default['default'].createElement(
|
|
1038
692
|
'span',
|
|
1039
693
|
{ style: { display: 'inline-block' } },
|
|
1040
694
|
timeDifferenceCalc(article.published)
|
|
1041
695
|
)
|
|
1042
696
|
),
|
|
1043
|
-
React__default.createElement(
|
|
697
|
+
React__default['default'].createElement(
|
|
1044
698
|
'div',
|
|
1045
699
|
{ className: 'author-sec', style: { lineHeight: 1.5 } },
|
|
1046
|
-
showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
|
|
1047
|
-
index
|
|
700
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default['default'].createElement(
|
|
701
|
+
index.LazyLoad,
|
|
1048
702
|
{ height: 50 },
|
|
1049
|
-
React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
|
|
703
|
+
React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: index$1.toString(), index: index$1, authors: article.authorMapping })
|
|
1050
704
|
)
|
|
1051
705
|
),
|
|
1052
|
-
!article.thumbnail && !defaultImage && article.source && React__default.createElement(
|
|
706
|
+
!article.thumbnail && !defaultImage && article.source && React__default['default'].createElement(
|
|
1053
707
|
'div',
|
|
1054
708
|
{ className: 'content-category-label' },
|
|
1055
|
-
React__default.createElement(
|
|
709
|
+
React__default['default'].createElement(
|
|
1056
710
|
'div',
|
|
1057
711
|
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
1058
712
|
article.source
|
|
1059
713
|
)
|
|
1060
714
|
),
|
|
1061
|
-
React__default.createElement(
|
|
715
|
+
React__default['default'].createElement(
|
|
1062
716
|
'div',
|
|
1063
717
|
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
1064
|
-
showCategory && article.contentCategory && React__default.createElement(
|
|
718
|
+
showCategory && article.contentCategory && React__default['default'].createElement(
|
|
1065
719
|
'p',
|
|
1066
720
|
{
|
|
1067
721
|
className: 'article-category',
|
|
@@ -1075,7 +729,7 @@ var CardLoader = function CardLoader(_ref) {
|
|
|
1075
729
|
} },
|
|
1076
730
|
getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
|
|
1077
731
|
),
|
|
1078
|
-
article.issueSection && article.issueSection.name && React__default.createElement(
|
|
732
|
+
article.issueSection && article.issueSection.name && React__default['default'].createElement(
|
|
1079
733
|
'p',
|
|
1080
734
|
{
|
|
1081
735
|
className: 'issueSection',
|
|
@@ -1091,49 +745,556 @@ var CardLoader = function CardLoader(_ref) {
|
|
|
1091
745
|
article.issueSection.name
|
|
1092
746
|
)
|
|
1093
747
|
),
|
|
1094
|
-
showPubInfo && (article.issue || article.volume) && React__default.createElement(
|
|
748
|
+
showPubInfo && (article.issue || article.volume) && React__default['default'].createElement(
|
|
1095
749
|
'div',
|
|
1096
750
|
{ className: 'pubInfo' },
|
|
1097
|
-
article.volume && React__default.createElement(
|
|
751
|
+
article.volume && React__default['default'].createElement(
|
|
1098
752
|
'p',
|
|
1099
753
|
{ className: 'qdeVolume' },
|
|
1100
754
|
article.volume
|
|
1101
755
|
),
|
|
1102
|
-
article.issue && React__default.createElement(
|
|
756
|
+
article.issue && React__default['default'].createElement(
|
|
1103
757
|
'p',
|
|
1104
758
|
{ className: 'qdeIssue' },
|
|
1105
759
|
article.issue
|
|
1106
760
|
)
|
|
1107
761
|
),
|
|
1108
|
-
showIntro && article.summary && React__default.createElement(
|
|
762
|
+
showIntro && article.summary && React__default['default'].createElement(
|
|
1109
763
|
'p',
|
|
1110
764
|
{ className: 'pt-2 card-text' },
|
|
1111
765
|
entities.clean_html_1(article.summary)
|
|
1112
766
|
)
|
|
1113
767
|
)
|
|
1114
768
|
),
|
|
1115
|
-
React__default.createElement(
|
|
769
|
+
React__default['default'].createElement(
|
|
1116
770
|
'div',
|
|
1117
771
|
null,
|
|
1118
|
-
main.
|
|
772
|
+
main.main_43 && rightItems && (index$1 + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index$1, numberOfItemsBeforeAd, rightItems)
|
|
773
|
+
)
|
|
774
|
+
)
|
|
775
|
+
);
|
|
776
|
+
} else return null;
|
|
777
|
+
}) :
|
|
778
|
+
// For Javascript Disabled Cases
|
|
779
|
+
React__default['default'].createElement(
|
|
780
|
+
'noscript',
|
|
781
|
+
null,
|
|
782
|
+
data.map(function (article, index$1) {
|
|
783
|
+
var pageNumber = article.pageNumber || values.page;
|
|
784
|
+
var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
|
|
785
|
+
|
|
786
|
+
if (article._type === 'feature') {
|
|
787
|
+
featureCount++;
|
|
788
|
+
if (article.blank || checkExternalUrl(article.url.current)) {
|
|
789
|
+
return React__default['default'].createElement(
|
|
790
|
+
visibilitySensor.VisibilitySensor,
|
|
791
|
+
{
|
|
792
|
+
key: article._id ? article._id : index$1,
|
|
793
|
+
partialVisibility: true,
|
|
794
|
+
onChange: function onChange(isVisible) {
|
|
795
|
+
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
|
|
796
|
+
} },
|
|
797
|
+
React__default['default'].createElement(
|
|
798
|
+
React__default['default'].Fragment,
|
|
799
|
+
null,
|
|
800
|
+
React__default['default'].createElement(
|
|
801
|
+
reactBootstrap.Media,
|
|
802
|
+
{
|
|
803
|
+
key: article._id ? article._id : index$1,
|
|
804
|
+
className: 'feature-media',
|
|
805
|
+
style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
806
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default['default'].createElement(
|
|
807
|
+
'a',
|
|
808
|
+
{ rel: 'noopener', href: article.url.current, target: '_blank', className: 'feature-wrapper' },
|
|
809
|
+
React__default['default'].createElement(
|
|
810
|
+
index.LazyLoad,
|
|
811
|
+
{ height: imageHeight, placeholder: React__default['default'].createElement(ImagePlaceholder, null) },
|
|
812
|
+
article.thumbnail && article.thumbnail.asset ? React__default['default'].createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default['default'].createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default['default'].createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
|
|
813
|
+
),
|
|
814
|
+
article.source && React__default['default'].createElement(
|
|
815
|
+
'div',
|
|
816
|
+
{ className: 'content-category-label' },
|
|
817
|
+
React__default['default'].createElement(
|
|
818
|
+
'div',
|
|
819
|
+
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
820
|
+
article.source
|
|
821
|
+
)
|
|
822
|
+
)
|
|
823
|
+
),
|
|
824
|
+
React__default['default'].createElement(
|
|
825
|
+
reactBootstrap.Media.Body,
|
|
826
|
+
null,
|
|
827
|
+
React__default['default'].createElement(
|
|
828
|
+
'a',
|
|
829
|
+
{ rel: 'noopener', href: article.url.current, target: '_blank' },
|
|
830
|
+
article.title && React__default['default'].createElement(
|
|
831
|
+
'h4',
|
|
832
|
+
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
833
|
+
article.title
|
|
834
|
+
)
|
|
835
|
+
),
|
|
836
|
+
showPublished && article.published && React__default['default'].createElement(
|
|
837
|
+
'p',
|
|
838
|
+
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
839
|
+
moment.moment(article.published).format('MMMM DD, YYYY')
|
|
840
|
+
),
|
|
841
|
+
showTimeDiff && article.published && React__default['default'].createElement(
|
|
842
|
+
'p',
|
|
843
|
+
{ className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
|
|
844
|
+
showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
|
|
845
|
+
if (index > 3) {
|
|
846
|
+
return null;
|
|
847
|
+
}
|
|
848
|
+
if (index === 3) {
|
|
849
|
+
return React__default['default'].createElement(
|
|
850
|
+
React__default['default'].Fragment,
|
|
851
|
+
null,
|
|
852
|
+
React__default['default'].createElement(
|
|
853
|
+
'em',
|
|
854
|
+
{ style: { marginRight: '.5rem' } },
|
|
855
|
+
'...'
|
|
856
|
+
)
|
|
857
|
+
);
|
|
858
|
+
}
|
|
859
|
+
return React__default['default'].createElement(
|
|
860
|
+
React__default['default'].Fragment,
|
|
861
|
+
null,
|
|
862
|
+
React__default['default'].createElement(
|
|
863
|
+
'em',
|
|
864
|
+
null,
|
|
865
|
+
taxonomy.name
|
|
866
|
+
),
|
|
867
|
+
' |',
|
|
868
|
+
' '
|
|
869
|
+
);
|
|
870
|
+
}),
|
|
871
|
+
' ',
|
|
872
|
+
React__default['default'].createElement(
|
|
873
|
+
'span',
|
|
874
|
+
{ style: { display: 'inline-block' } },
|
|
875
|
+
timeDifferenceCalc(article.published)
|
|
876
|
+
)
|
|
877
|
+
),
|
|
878
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default['default'].createElement(
|
|
879
|
+
index.LazyLoad,
|
|
880
|
+
{ height: 50 },
|
|
881
|
+
React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: index$1.toString(), index: index$1, authors: article.authorMapping })
|
|
882
|
+
),
|
|
883
|
+
!article.thumbnail && !defaultImage && article.source && React__default['default'].createElement(
|
|
884
|
+
'div',
|
|
885
|
+
{ className: 'content-category-label' },
|
|
886
|
+
React__default['default'].createElement(
|
|
887
|
+
'div',
|
|
888
|
+
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
889
|
+
article.source
|
|
890
|
+
)
|
|
891
|
+
),
|
|
892
|
+
React__default['default'].createElement(
|
|
893
|
+
'div',
|
|
894
|
+
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
895
|
+
showCategory && article.contentCategory && React__default['default'].createElement(
|
|
896
|
+
'p',
|
|
897
|
+
{
|
|
898
|
+
className: 'article-category',
|
|
899
|
+
style: {
|
|
900
|
+
background: '#3FB618',
|
|
901
|
+
color: '#ffffff',
|
|
902
|
+
marginBottom: '.25rem',
|
|
903
|
+
display: 'inline-block',
|
|
904
|
+
padding: '0 .25rem',
|
|
905
|
+
fontSize: '.8rem'
|
|
906
|
+
} },
|
|
907
|
+
getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
|
|
908
|
+
),
|
|
909
|
+
article.issueSection && article.issueSection.name && React__default['default'].createElement(
|
|
910
|
+
'p',
|
|
911
|
+
{
|
|
912
|
+
className: 'issueSection',
|
|
913
|
+
style: {
|
|
914
|
+
background: '#000000',
|
|
915
|
+
color: '#ffffff',
|
|
916
|
+
marginBottom: '.25rem',
|
|
917
|
+
marginLeft: '.25rem',
|
|
918
|
+
display: 'inline-block',
|
|
919
|
+
padding: '0 .25rem',
|
|
920
|
+
fontSize: '.8rem'
|
|
921
|
+
} },
|
|
922
|
+
article.issueSection.name
|
|
923
|
+
)
|
|
924
|
+
),
|
|
925
|
+
showPubInfo && (article.issue || article.volume) && React__default['default'].createElement(
|
|
926
|
+
'div',
|
|
927
|
+
{ className: 'pubInfo' },
|
|
928
|
+
article.volume && React__default['default'].createElement(
|
|
929
|
+
'p',
|
|
930
|
+
{ className: 'qdeVolume' },
|
|
931
|
+
article.volume
|
|
932
|
+
),
|
|
933
|
+
article.issue && React__default['default'].createElement(
|
|
934
|
+
'p',
|
|
935
|
+
{ className: 'qdeIssue' },
|
|
936
|
+
article.issue
|
|
937
|
+
)
|
|
938
|
+
),
|
|
939
|
+
showIntro && article.summary && React__default['default'].createElement(
|
|
940
|
+
'p',
|
|
941
|
+
{ className: 'pt-2 card-text' },
|
|
942
|
+
entities.clean_html_1(article.summary)
|
|
943
|
+
)
|
|
944
|
+
)
|
|
945
|
+
)
|
|
946
|
+
)
|
|
947
|
+
);
|
|
948
|
+
} else {
|
|
949
|
+
return React__default['default'].createElement(
|
|
950
|
+
visibilitySensor.VisibilitySensor,
|
|
951
|
+
{
|
|
952
|
+
key: article._id ? article._id : index$1,
|
|
953
|
+
partialVisibility: true,
|
|
954
|
+
onChange: function onChange(isVisible) {
|
|
955
|
+
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
|
|
956
|
+
} },
|
|
957
|
+
React__default['default'].createElement(
|
|
958
|
+
React__default['default'].Fragment,
|
|
959
|
+
null,
|
|
960
|
+
React__default['default'].createElement(
|
|
961
|
+
reactBootstrap.Media,
|
|
962
|
+
{
|
|
963
|
+
key: article._id ? article._id : index$1,
|
|
964
|
+
className: 'feature-media',
|
|
965
|
+
style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
966
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default['default'].createElement(
|
|
967
|
+
'a',
|
|
968
|
+
{ href: article.url.current, className: 'feature-wrapper' },
|
|
969
|
+
React__default['default'].createElement(
|
|
970
|
+
index.LazyLoad,
|
|
971
|
+
{ height: imageHeight, placeholder: React__default['default'].createElement(ImagePlaceholder, null) },
|
|
972
|
+
article.thumbnail && article.thumbnail.asset ? React__default['default'].createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default['default'].createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default['default'].createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
|
|
973
|
+
),
|
|
974
|
+
article.source && React__default['default'].createElement(
|
|
975
|
+
'div',
|
|
976
|
+
{ className: 'content-category-label' },
|
|
977
|
+
React__default['default'].createElement(
|
|
978
|
+
'div',
|
|
979
|
+
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
980
|
+
article.source
|
|
981
|
+
)
|
|
982
|
+
)
|
|
983
|
+
),
|
|
984
|
+
React__default['default'].createElement(
|
|
985
|
+
reactBootstrap.Media.Body,
|
|
986
|
+
null,
|
|
987
|
+
React__default['default'].createElement(
|
|
988
|
+
'a',
|
|
989
|
+
{ href: article.url.current },
|
|
990
|
+
article.title && React__default['default'].createElement(
|
|
991
|
+
'h4',
|
|
992
|
+
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
993
|
+
article.title
|
|
994
|
+
)
|
|
995
|
+
),
|
|
996
|
+
showPublished && article.published && React__default['default'].createElement(
|
|
997
|
+
'p',
|
|
998
|
+
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
999
|
+
moment.moment(article.published).format('MMMM DD, YYYY')
|
|
1000
|
+
),
|
|
1001
|
+
showTimeDiff && article.published && React__default['default'].createElement(
|
|
1002
|
+
'p',
|
|
1003
|
+
{ className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
|
|
1004
|
+
showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
|
|
1005
|
+
if (index > 3) {
|
|
1006
|
+
return null;
|
|
1007
|
+
}
|
|
1008
|
+
if (index === 3) {
|
|
1009
|
+
return React__default['default'].createElement(
|
|
1010
|
+
React__default['default'].Fragment,
|
|
1011
|
+
null,
|
|
1012
|
+
React__default['default'].createElement(
|
|
1013
|
+
'em',
|
|
1014
|
+
{ style: { marginRight: '.5rem' } },
|
|
1015
|
+
'...'
|
|
1016
|
+
)
|
|
1017
|
+
);
|
|
1018
|
+
}
|
|
1019
|
+
return React__default['default'].createElement(
|
|
1020
|
+
React__default['default'].Fragment,
|
|
1021
|
+
null,
|
|
1022
|
+
React__default['default'].createElement(
|
|
1023
|
+
'em',
|
|
1024
|
+
null,
|
|
1025
|
+
taxonomy.name
|
|
1026
|
+
),
|
|
1027
|
+
' |',
|
|
1028
|
+
' '
|
|
1029
|
+
);
|
|
1030
|
+
}),
|
|
1031
|
+
' ',
|
|
1032
|
+
React__default['default'].createElement(
|
|
1033
|
+
'span',
|
|
1034
|
+
{ style: { display: 'inline-block' } },
|
|
1035
|
+
timeDifferenceCalc(article.published)
|
|
1036
|
+
)
|
|
1037
|
+
),
|
|
1038
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default['default'].createElement(
|
|
1039
|
+
index.LazyLoad,
|
|
1040
|
+
{ height: 50 },
|
|
1041
|
+
React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: index$1.toString(), index: index$1, authors: article.authorMapping })
|
|
1042
|
+
),
|
|
1043
|
+
!article.thumbnail && !defaultImage && article.source && React__default['default'].createElement(
|
|
1044
|
+
'div',
|
|
1045
|
+
{ className: 'content-category-label' },
|
|
1046
|
+
React__default['default'].createElement(
|
|
1047
|
+
'div',
|
|
1048
|
+
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
1049
|
+
article.source
|
|
1050
|
+
)
|
|
1051
|
+
),
|
|
1052
|
+
React__default['default'].createElement(
|
|
1053
|
+
'div',
|
|
1054
|
+
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
1055
|
+
showCategory && article.contentCategory && React__default['default'].createElement(
|
|
1056
|
+
'p',
|
|
1057
|
+
{
|
|
1058
|
+
className: 'article-category',
|
|
1059
|
+
style: {
|
|
1060
|
+
background: '#3FB618',
|
|
1061
|
+
color: '#ffffff',
|
|
1062
|
+
marginBottom: '.25rem',
|
|
1063
|
+
display: 'inline-block',
|
|
1064
|
+
padding: '0 .25rem',
|
|
1065
|
+
fontSize: '.8rem'
|
|
1066
|
+
} },
|
|
1067
|
+
getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
|
|
1068
|
+
),
|
|
1069
|
+
article.issueSection && article.issueSection.name && React__default['default'].createElement(
|
|
1070
|
+
'p',
|
|
1071
|
+
{
|
|
1072
|
+
className: 'issueSection',
|
|
1073
|
+
style: {
|
|
1074
|
+
background: '#000000',
|
|
1075
|
+
color: '#ffffff',
|
|
1076
|
+
marginBottom: '.25rem',
|
|
1077
|
+
marginLeft: '.25rem',
|
|
1078
|
+
display: 'inline-block',
|
|
1079
|
+
padding: '0 .25rem',
|
|
1080
|
+
fontSize: '.8rem'
|
|
1081
|
+
} },
|
|
1082
|
+
article.issueSection.name
|
|
1083
|
+
)
|
|
1084
|
+
),
|
|
1085
|
+
showPubInfo && (article.issue || article.volume) && React__default['default'].createElement(
|
|
1086
|
+
'div',
|
|
1087
|
+
{ className: 'pubInfo' },
|
|
1088
|
+
article.volume && React__default['default'].createElement(
|
|
1089
|
+
'p',
|
|
1090
|
+
{ className: 'qdeVolume' },
|
|
1091
|
+
article.volume
|
|
1092
|
+
),
|
|
1093
|
+
article.issue && React__default['default'].createElement(
|
|
1094
|
+
'p',
|
|
1095
|
+
{ className: 'qdeIssue' },
|
|
1096
|
+
article.issue
|
|
1097
|
+
)
|
|
1098
|
+
),
|
|
1099
|
+
showIntro && article.summary && React__default['default'].createElement(
|
|
1100
|
+
'p',
|
|
1101
|
+
{ className: 'pt-2 card-text' },
|
|
1102
|
+
entities.clean_html_1(article.summary)
|
|
1103
|
+
)
|
|
1104
|
+
)
|
|
1105
|
+
)
|
|
1106
|
+
)
|
|
1107
|
+
);
|
|
1108
|
+
}
|
|
1109
|
+
} else if (article._type === 'lg-infeed' && article.adUnit) {
|
|
1110
|
+
return React__default['default'].createElement(ADlgInfeed.ADlgInfeed, _extends._extends({ index: index$1 }, article));
|
|
1111
|
+
} else if (article._type === 'brandInsightAd' && article.adUnit) {
|
|
1112
|
+
return React__default['default'].createElement(ADInfeed.ADInfeed, { index: index$1, infeedAd: article });
|
|
1113
|
+
}
|
|
1114
|
+
if ((brandInsightAd ? index$1 > heroContent + featureCount : index$1 + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
|
|
1115
|
+
return React__default['default'].createElement(
|
|
1116
|
+
visibilitySensor.VisibilitySensor,
|
|
1117
|
+
{
|
|
1118
|
+
key: article._id ? article._id : index$1,
|
|
1119
|
+
onChange: function onChange(isVisible) {
|
|
1120
|
+
// Passing 'articleCount' instead of index because index will be including the indexes of ads whereas articleCount will be having index of artilce only.
|
|
1121
|
+
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, article.articleCount ? article.articleCount : index$1);
|
|
1122
|
+
} },
|
|
1123
|
+
React__default['default'].createElement(
|
|
1124
|
+
React__default['default'].Fragment,
|
|
1125
|
+
null,
|
|
1126
|
+
React__default['default'].createElement(
|
|
1127
|
+
reactBootstrap.Media,
|
|
1128
|
+
{
|
|
1129
|
+
key: article._id ? article._id : index$1,
|
|
1130
|
+
style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
1131
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default['default'].createElement(
|
|
1132
|
+
'a',
|
|
1133
|
+
{ href: mapping[contentCategoryName] + '/' + article.url.current, className: 'img-wrapper' },
|
|
1134
|
+
React__default['default'].createElement(
|
|
1135
|
+
index.LazyLoad,
|
|
1136
|
+
{ height: imageHeight, placeholder: React__default['default'].createElement(ImagePlaceholder, null) },
|
|
1137
|
+
article.thumbnail && article.thumbnail.asset ? React__default['default'].createElement('img', { className: 'mr-3 img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default['default'].createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default['default'].createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
|
|
1138
|
+
),
|
|
1139
|
+
article.source && React__default['default'].createElement(
|
|
1140
|
+
'div',
|
|
1141
|
+
{ className: 'content-category-label' },
|
|
1142
|
+
React__default['default'].createElement(
|
|
1143
|
+
'div',
|
|
1144
|
+
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
1145
|
+
article.source
|
|
1146
|
+
)
|
|
1147
|
+
)
|
|
1148
|
+
),
|
|
1149
|
+
React__default['default'].createElement(
|
|
1150
|
+
reactBootstrap.Media.Body,
|
|
1151
|
+
null,
|
|
1152
|
+
React__default['default'].createElement(
|
|
1153
|
+
'a',
|
|
1154
|
+
{ href: mapping[contentCategoryName] + '/' + article.url.current },
|
|
1155
|
+
article.title && React__default['default'].createElement(
|
|
1156
|
+
'h4',
|
|
1157
|
+
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
1158
|
+
article.title
|
|
1159
|
+
)
|
|
1160
|
+
),
|
|
1161
|
+
showPublished && article.published && React__default['default'].createElement(
|
|
1162
|
+
'p',
|
|
1163
|
+
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
1164
|
+
moment.moment(article.published).format('MMMM DD, YYYY')
|
|
1165
|
+
),
|
|
1166
|
+
showTimeDiff && article.published && React__default['default'].createElement(
|
|
1167
|
+
'p',
|
|
1168
|
+
{ className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
|
|
1169
|
+
showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
|
|
1170
|
+
if (index > 3) {
|
|
1171
|
+
return null;
|
|
1172
|
+
}
|
|
1173
|
+
if (index === 3) {
|
|
1174
|
+
return React__default['default'].createElement(
|
|
1175
|
+
React__default['default'].Fragment,
|
|
1176
|
+
null,
|
|
1177
|
+
React__default['default'].createElement(
|
|
1178
|
+
'em',
|
|
1179
|
+
{ style: { marginRight: '.5rem' } },
|
|
1180
|
+
'...'
|
|
1181
|
+
)
|
|
1182
|
+
);
|
|
1183
|
+
}
|
|
1184
|
+
return React__default['default'].createElement(
|
|
1185
|
+
React__default['default'].Fragment,
|
|
1186
|
+
null,
|
|
1187
|
+
React__default['default'].createElement(
|
|
1188
|
+
'em',
|
|
1189
|
+
null,
|
|
1190
|
+
taxonomy.name
|
|
1191
|
+
),
|
|
1192
|
+
' |',
|
|
1193
|
+
' '
|
|
1194
|
+
);
|
|
1195
|
+
}),
|
|
1196
|
+
' ',
|
|
1197
|
+
React__default['default'].createElement(
|
|
1198
|
+
'span',
|
|
1199
|
+
{ style: { display: 'inline-block' } },
|
|
1200
|
+
timeDifferenceCalc(article.published)
|
|
1201
|
+
)
|
|
1202
|
+
),
|
|
1203
|
+
React__default['default'].createElement(
|
|
1204
|
+
'div',
|
|
1205
|
+
{ className: 'author-sec', style: { lineHeight: 1.5 } },
|
|
1206
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default['default'].createElement(
|
|
1207
|
+
index.LazyLoad,
|
|
1208
|
+
{ height: 50 },
|
|
1209
|
+
React__default['default'].createElement(AuthorComponent.AuthorComponent, { key: index$1.toString(), index: index$1, authors: article.authorMapping })
|
|
1210
|
+
)
|
|
1211
|
+
),
|
|
1212
|
+
!article.thumbnail && !defaultImage && article.source && React__default['default'].createElement(
|
|
1213
|
+
'div',
|
|
1214
|
+
{ className: 'content-category-label' },
|
|
1215
|
+
React__default['default'].createElement(
|
|
1216
|
+
'div',
|
|
1217
|
+
{ className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
|
|
1218
|
+
article.source
|
|
1219
|
+
)
|
|
1220
|
+
),
|
|
1221
|
+
React__default['default'].createElement(
|
|
1222
|
+
'div',
|
|
1223
|
+
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
1224
|
+
showCategory && article.contentCategory && React__default['default'].createElement(
|
|
1225
|
+
'p',
|
|
1226
|
+
{
|
|
1227
|
+
className: 'article-category',
|
|
1228
|
+
style: {
|
|
1229
|
+
background: '#3FB618',
|
|
1230
|
+
color: '#ffffff',
|
|
1231
|
+
marginBottom: '.25rem',
|
|
1232
|
+
display: 'inline-block',
|
|
1233
|
+
padding: '0 .25rem',
|
|
1234
|
+
fontSize: '.8rem'
|
|
1235
|
+
} },
|
|
1236
|
+
getContentCategory.getContentCategory(article.contentCategory.name, contentCategoryMapping)
|
|
1237
|
+
),
|
|
1238
|
+
article.issueSection && article.issueSection.name && React__default['default'].createElement(
|
|
1239
|
+
'p',
|
|
1240
|
+
{
|
|
1241
|
+
className: 'issueSection',
|
|
1242
|
+
style: {
|
|
1243
|
+
background: '#000000',
|
|
1244
|
+
color: '#ffffff',
|
|
1245
|
+
marginBottom: '.25rem',
|
|
1246
|
+
marginLeft: '.25rem',
|
|
1247
|
+
display: 'inline-block',
|
|
1248
|
+
padding: '0 .25rem',
|
|
1249
|
+
fontSize: '.8rem'
|
|
1250
|
+
} },
|
|
1251
|
+
article.issueSection.name
|
|
1252
|
+
)
|
|
1253
|
+
),
|
|
1254
|
+
showPubInfo && (article.issue || article.volume) && React__default['default'].createElement(
|
|
1255
|
+
'div',
|
|
1256
|
+
{ className: 'pubInfo' },
|
|
1257
|
+
article.volume && React__default['default'].createElement(
|
|
1258
|
+
'p',
|
|
1259
|
+
{ className: 'qdeVolume' },
|
|
1260
|
+
article.volume
|
|
1261
|
+
),
|
|
1262
|
+
article.issue && React__default['default'].createElement(
|
|
1263
|
+
'p',
|
|
1264
|
+
{ className: 'qdeIssue' },
|
|
1265
|
+
article.issue
|
|
1266
|
+
)
|
|
1267
|
+
),
|
|
1268
|
+
showIntro && article.summary && React__default['default'].createElement(
|
|
1269
|
+
'p',
|
|
1270
|
+
{ className: 'pt-2 card-text' },
|
|
1271
|
+
entities.clean_html_1(article.summary)
|
|
1272
|
+
)
|
|
1273
|
+
)
|
|
1274
|
+
),
|
|
1275
|
+
React__default['default'].createElement(
|
|
1276
|
+
'div',
|
|
1277
|
+
null,
|
|
1278
|
+
main.main_43 && rightItems && (index$1 + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index$1, numberOfItemsBeforeAd, rightItems)
|
|
1279
|
+
)
|
|
1119
1280
|
)
|
|
1120
1281
|
);
|
|
1121
1282
|
} else return null;
|
|
1122
1283
|
})
|
|
1123
|
-
) : React__default.createElement(
|
|
1284
|
+
) : React__default['default'].createElement(
|
|
1124
1285
|
'div',
|
|
1125
1286
|
null,
|
|
1126
|
-
React__default.createElement(
|
|
1287
|
+
React__default['default'].createElement(
|
|
1127
1288
|
'h5',
|
|
1128
1289
|
null,
|
|
1129
|
-
React__default.createElement(
|
|
1290
|
+
React__default['default'].createElement(
|
|
1130
1291
|
'em',
|
|
1131
1292
|
null,
|
|
1132
1293
|
'New content coming soon, please check back later.'
|
|
1133
1294
|
)
|
|
1134
1295
|
)
|
|
1135
1296
|
),
|
|
1136
|
-
React__default.createElement(
|
|
1297
|
+
React__default['default'].createElement(
|
|
1137
1298
|
'style',
|
|
1138
1299
|
{ jsx: 'true' },
|
|
1139
1300
|
'\n .displayLabelThumb {\n margin: 0 auto;\n margin-top: -1.25rem;\n background-color: white;\n position: relative;\n }\n .content-category-label {\n margin: 0.5rem 0;\n display: block;\n }\n .sanityDisplayLabel {\n margin: 0.5rem 0;\n border: 1px solid black;\n width: fit-content;\n width: -moz-fit-content;\n padding: 5px;\n color: #484848;\n border-radius: 2px;\n }\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 height: 100%;\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 .sanityDisplayLabel {\n max-width: 100%;\n }\n .img-wrapper {\n width: 100%;\n }\n .img-wrapper img {\n padding-bottom: 1em;\n }\n .media {\n flex-direction: column !important;\n }\n }\n '
|
|
@@ -1142,11 +1303,11 @@ var CardLoader = function CardLoader(_ref) {
|
|
|
1142
1303
|
};
|
|
1143
1304
|
|
|
1144
1305
|
var ImagePlaceholder = function ImagePlaceholder() {
|
|
1145
|
-
return React__default.createElement(
|
|
1146
|
-
React__default.Fragment,
|
|
1306
|
+
return React__default['default'].createElement(
|
|
1307
|
+
React__default['default'].Fragment,
|
|
1147
1308
|
null,
|
|
1148
|
-
React__default.createElement('div', { className: 'queuedeck-exp-image-placeholder' }),
|
|
1149
|
-
React__default.createElement(
|
|
1309
|
+
React__default['default'].createElement('div', { className: 'queuedeck-exp-image-placeholder' }),
|
|
1310
|
+
React__default['default'].createElement(
|
|
1150
1311
|
'style',
|
|
1151
1312
|
{ jsx: 'true' },
|
|
1152
1313
|
'\n .queuedeck-exp-image-placeholder {\n width: 240px;\n height: 0;\n padding-top: calc(240px * 9 / 16);\n margin: 0 1rem 0 0;\n }\n @media only screen and (max-width: 767px) {\n .queuedeck-exp-image-placeholder {\n width: 100%;\n height: 0;\n padding-top: calc(100% * 9 / 16);\n margin: 0 0 1rem 0;\n }\n }\n '
|
|
@@ -1156,7 +1317,7 @@ var ImagePlaceholder = function ImagePlaceholder() {
|
|
|
1156
1317
|
|
|
1157
1318
|
var renderMobileAd = function renderMobileAd(index, numberOfItemsBeforeAd, rightItems) {
|
|
1158
1319
|
var i = numberOfItemsBeforeAd < 6 ? 0 : ((index + 1) / numberOfItemsBeforeAd - 1) % rightItems.length;
|
|
1159
|
-
return React__default.createElement(
|
|
1320
|
+
return React__default['default'].createElement(
|
|
1160
1321
|
'div',
|
|
1161
1322
|
{ style: { display: 'flex', flex: '1 0 auto' } },
|
|
1162
1323
|
rightItems[i].component
|
|
@@ -1173,11 +1334,23 @@ var usePrevious = function usePrevious(value) {
|
|
|
1173
1334
|
|
|
1174
1335
|
var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
1175
1336
|
var router = Router.useRouter();
|
|
1337
|
+
|
|
1338
|
+
// Logging GA Pageview on path change
|
|
1339
|
+
var prevPath = usePrevious(lodash.lodash.get(router, 'asPath', undefined));
|
|
1340
|
+
React.useEffect(function () {
|
|
1341
|
+
var pageview = props.pageview;
|
|
1342
|
+
|
|
1343
|
+
var currentPath = router.asPath;
|
|
1344
|
+
if (prevPath && prevPath !== currentPath && pageview) {
|
|
1345
|
+
pageview(router.asPath);
|
|
1346
|
+
}
|
|
1347
|
+
}, [router]);
|
|
1348
|
+
|
|
1176
1349
|
var initialData = props.dataRecord,
|
|
1177
|
-
initialCurrentPage = props.currentPage,
|
|
1178
1350
|
client = props.client,
|
|
1179
1351
|
params = props.params,
|
|
1180
1352
|
query = props.query,
|
|
1353
|
+
autoScroll = props.autoScroll,
|
|
1181
1354
|
pointer = props.pointer,
|
|
1182
1355
|
pointerArray = props.pointerArray,
|
|
1183
1356
|
mapping = props.mapping,
|
|
@@ -1207,160 +1380,159 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
1207
1380
|
_props$showIntro = props.showIntro,
|
|
1208
1381
|
showIntro = _props$showIntro === undefined ? true : _props$showIntro,
|
|
1209
1382
|
_props$contentCategor = props.contentCategoryMapping,
|
|
1210
|
-
contentCategoryMapping = _props$contentCategor === undefined ? [] : _props$contentCategor
|
|
1211
|
-
|
|
1212
|
-
|
|
1383
|
+
contentCategoryMapping = _props$contentCategor === undefined ? [] : _props$contentCategor;
|
|
1384
|
+
var initialCurrentPage = props.currentPage,
|
|
1385
|
+
showPublished = props.showPublished;
|
|
1213
1386
|
|
|
1214
1387
|
var _useState3 = React.useState(initialData),
|
|
1215
1388
|
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
1216
1389
|
data = _useState4[0],
|
|
1217
1390
|
setData = _useState4[1];
|
|
1218
1391
|
|
|
1219
|
-
var _useState5 = React.useState(
|
|
1392
|
+
var _useState5 = React.useState(true),
|
|
1220
1393
|
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
1221
|
-
|
|
1222
|
-
|
|
1394
|
+
scrolling = _useState6[0],
|
|
1395
|
+
setScrolling = _useState6[1];
|
|
1223
1396
|
|
|
1224
|
-
var
|
|
1397
|
+
var _useState7 = React.useState(initialCurrentPage || 1),
|
|
1398
|
+
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
1399
|
+
currentPage = _useState8[0],
|
|
1400
|
+
setCurrentPage = _useState8[1];
|
|
1225
1401
|
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
if (prevPath && prevPath !== currentPath && pageview) {
|
|
1231
|
-
pageview(router.asPath);
|
|
1232
|
-
}
|
|
1233
|
-
}, [router]);
|
|
1402
|
+
var _useState9 = React.useState(initialData ? initialData.length : 0),
|
|
1403
|
+
_useState10 = slicedToArray._slicedToArray(_useState9, 2),
|
|
1404
|
+
lastDataSize = _useState10[0],
|
|
1405
|
+
setLastDataSize = _useState10[1];
|
|
1234
1406
|
|
|
1235
|
-
var
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
var partialQSArr = partialQS.split('&');
|
|
1244
|
-
// exclude page=xxx from query string
|
|
1245
|
-
partialQSArr.map(function (item) {
|
|
1246
|
-
var itemArr = item.split('=');
|
|
1247
|
-
var key = itemArr[0];
|
|
1248
|
-
var val = itemArr[1];
|
|
1249
|
-
if (key !== 'page') queryString += (queryString.length === 0 ? '' : '&') + key + '=' + val;
|
|
1250
|
-
});
|
|
1251
|
-
}
|
|
1252
|
-
if (queryString.length > 0) path += '?' + queryString;
|
|
1253
|
-
pageNumber = parseInt(pageNumber);
|
|
1254
|
-
if (currentPage !== pageNumber) {
|
|
1255
|
-
if (path[0] !== '/') path = '/' + path;
|
|
1256
|
-
var newPath = pageNumber === 1 ? '' + path : '' + path + (queryString.length > 0 ? '&' : '?') + 'page=' + pageNumber;
|
|
1257
|
-
router.push(pathname, newPath, {
|
|
1258
|
-
shallow: true
|
|
1259
|
-
});
|
|
1260
|
-
}
|
|
1261
|
-
};
|
|
1407
|
+
var _useState11 = React.useState({
|
|
1408
|
+
from: params ? params.from : 0,
|
|
1409
|
+
to: params ? params.to : 0,
|
|
1410
|
+
page: initialCurrentPage ? initialCurrentPage : 1
|
|
1411
|
+
}),
|
|
1412
|
+
_useState12 = slicedToArray._slicedToArray(_useState11, 2),
|
|
1413
|
+
values = _useState12[0],
|
|
1414
|
+
setValues = _useState12[1];
|
|
1262
1415
|
|
|
1263
|
-
var
|
|
1264
|
-
var _ref2 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(selectedPage) {
|
|
1265
|
-
var start, newParams, newData;
|
|
1266
|
-
return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
|
|
1267
|
-
while (1) {
|
|
1268
|
-
switch (_context.prev = _context.next) {
|
|
1269
|
-
case 0:
|
|
1270
|
-
setData(null);
|
|
1271
|
-
document.body.scrollTop = 0;
|
|
1272
|
-
document.documentElement.scrollTop = 0;
|
|
1273
|
-
start = (selectedPage - 1) * itemsPerPage;
|
|
1274
|
-
newParams = _extends._extends({}, params, {
|
|
1275
|
-
from: start,
|
|
1276
|
-
to: start + itemsPerPage
|
|
1277
|
-
});
|
|
1278
|
-
_context.prev = 5;
|
|
1279
|
-
_context.next = 8;
|
|
1280
|
-
return client.fetch(query, newParams);
|
|
1416
|
+
var itemsPerPage = params && params.itemsPerPage ? params.itemsPerPage : 10;
|
|
1281
1417
|
|
|
1282
|
-
|
|
1283
|
-
newData = _context.sent;
|
|
1418
|
+
var prevValues = usePrevious(values);
|
|
1284
1419
|
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
setCurrentPage(selectedPage);
|
|
1290
|
-
index.lib_3.refresh();
|
|
1291
|
-
}
|
|
1292
|
-
_context.next = 16;
|
|
1293
|
-
break;
|
|
1420
|
+
var renderManualPagination = function renderManualPagination(currentPage) {
|
|
1421
|
+
if (lastDataSize < itemsPerPage) {
|
|
1422
|
+
return null;
|
|
1423
|
+
}
|
|
1294
1424
|
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1425
|
+
return React__default['default'].createElement(
|
|
1426
|
+
'div',
|
|
1427
|
+
{ className: 'd-flex justify-content-between' },
|
|
1428
|
+
currentPage && currentPage > 1 && React__default['default'].createElement(
|
|
1429
|
+
'a',
|
|
1430
|
+
{ href: '?page=' + (currentPage - 1) },
|
|
1431
|
+
'<< Previous'
|
|
1432
|
+
),
|
|
1433
|
+
React__default['default'].createElement(
|
|
1434
|
+
'a',
|
|
1435
|
+
{ href: '?page=' + (currentPage + 1) },
|
|
1436
|
+
'Next >>'
|
|
1437
|
+
)
|
|
1438
|
+
);
|
|
1439
|
+
};
|
|
1298
1440
|
|
|
1299
|
-
|
|
1441
|
+
// check for change in filter parameters from client side and refresh the page
|
|
1442
|
+
React.useEffect(function () {
|
|
1443
|
+
if (initialData && data !== initialData && initialData.length >= 0) {
|
|
1444
|
+
setData(initialData);
|
|
1445
|
+
setCurrentPage(initialCurrentPage ? initialCurrentPage : 1);
|
|
1446
|
+
setValues({
|
|
1447
|
+
from: params ? params.from : 0,
|
|
1448
|
+
to: params ? params.to : 0,
|
|
1449
|
+
page: initialCurrentPage ? initialCurrentPage : 1
|
|
1450
|
+
});
|
|
1451
|
+
if (initialData.length > 0) {
|
|
1452
|
+
setScrolling(true);
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
}, [initialData]);
|
|
1300
1456
|
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1457
|
+
React.useEffect(function () {
|
|
1458
|
+
if (prevValues) {
|
|
1459
|
+
if (values.page !== prevValues.page && values.from !== prevValues.from && values.to !== prevValues.to) {
|
|
1460
|
+
loadData(values, query, client, params, setData, setScrolling, setLastDataSize, pointer, pointerArray);
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
}, [values, prevValues, query, client, params, setData, setScrolling, setLastDataSize, pointer, pointerArray]);
|
|
1308
1464
|
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1465
|
+
// useEffect(() => {
|
|
1466
|
+
// document.addEventListener('scroll', trackScrolling)
|
|
1467
|
+
// return () => {
|
|
1468
|
+
// document.removeEventListener('scroll', trackScrolling)
|
|
1469
|
+
// }
|
|
1470
|
+
// }, [currentPage])
|
|
1313
1471
|
|
|
1314
|
-
|
|
1472
|
+
// const trackScrolling = (current) => {
|
|
1473
|
+
// if (window.pageYOffset === 0) {
|
|
1474
|
+
// if (currentPage > 1) {
|
|
1475
|
+
// changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, 1)
|
|
1476
|
+
// }
|
|
1477
|
+
// }
|
|
1478
|
+
// }
|
|
1479
|
+
|
|
1480
|
+
return React__default['default'].createElement(
|
|
1315
1481
|
'div',
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
'
|
|
1319
|
-
|
|
1320
|
-
React__default.createElement(
|
|
1321
|
-
|
|
1322
|
-
{
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1482
|
+
null,
|
|
1483
|
+
autoScroll ? React__default['default'].createElement(
|
|
1484
|
+
React__default['default'].Fragment,
|
|
1485
|
+
null,
|
|
1486
|
+
React__default['default'].createElement(
|
|
1487
|
+
index_es.InfiniteScroll,
|
|
1488
|
+
{ dataLength: data && data.length, next: function next() {
|
|
1489
|
+
return loadMore(values, setValues, itemsPerPage);
|
|
1490
|
+
}, hasMore: scrolling, scrollThreshold: 0.9 },
|
|
1491
|
+
React__default['default'].createElement(
|
|
1492
|
+
reactBootstrap.Container,
|
|
1493
|
+
null,
|
|
1494
|
+
cardLoader(data, client, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, imageMaxHeight, imageFit, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd, showPubInfo, contentCategoryMapping, showTimeDiff, showTaxonomies, showIntro)
|
|
1327
1495
|
)
|
|
1496
|
+
),
|
|
1497
|
+
React__default['default'].createElement(
|
|
1498
|
+
'noscript',
|
|
1499
|
+
null,
|
|
1500
|
+
renderManualPagination(currentPage)
|
|
1328
1501
|
)
|
|
1329
|
-
) : React__default.createElement(
|
|
1330
|
-
|
|
1502
|
+
) : React__default['default'].createElement(
|
|
1503
|
+
React__default['default'].Fragment,
|
|
1331
1504
|
null,
|
|
1332
|
-
React__default.createElement(
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
React__default.createElement(
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
'\n .pagination-wrapper {\n margin: 3rem 0;\n }\n @media only screen and (max-width: 768px) {\n .pagination-wrapper {\n margin-bottom: 6rem;\n }\n }\n '
|
|
1505
|
+
React__default['default'].createElement(
|
|
1506
|
+
reactBootstrap.Container,
|
|
1507
|
+
null,
|
|
1508
|
+
cardLoader(data, client, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, imageMaxHeight, imageFit, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd, showPubInfo, contentCategoryMapping, showTimeDiff, showTaxonomies, showIntro)
|
|
1509
|
+
),
|
|
1510
|
+
React__default['default'].createElement(
|
|
1511
|
+
'div',
|
|
1512
|
+
{ style: { padding: '0px 10px' } },
|
|
1513
|
+
scrolling ? React__default['default'].createElement(
|
|
1514
|
+
'button',
|
|
1515
|
+
{
|
|
1516
|
+
className: 'load-more-btn',
|
|
1517
|
+
style: { margin: 'auto', width: '100%' },
|
|
1518
|
+
onClick: function onClick(e) {
|
|
1519
|
+
loadMore(values, setValues, itemsPerPage);
|
|
1520
|
+
} },
|
|
1521
|
+
'Load More'
|
|
1522
|
+
) : React__default['default'].createElement(
|
|
1523
|
+
'p',
|
|
1524
|
+
{ style: { textAlign: 'center' } },
|
|
1525
|
+
React__default['default'].createElement(
|
|
1526
|
+
'b',
|
|
1527
|
+
null,
|
|
1528
|
+
'End of data'
|
|
1529
|
+
)
|
|
1530
|
+
)
|
|
1531
|
+
),
|
|
1532
|
+
React__default['default'].createElement(
|
|
1533
|
+
'noscript',
|
|
1534
|
+
null,
|
|
1535
|
+
renderManualPagination(currentPage)
|
|
1364
1536
|
)
|
|
1365
1537
|
)
|
|
1366
1538
|
);
|