@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,3880 +1,82 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
require('./core.get-iterator-method-f3c44602.js');
|
|
7
|
-
require('./_library-dd23b178.js');
|
|
8
|
-
require('./_iter-detect-05795553.js');
|
|
9
|
-
require('./toConsumableArray-c9b8a0d0.js');
|
|
10
|
-
require('./_object-pie-68c5bcbc.js');
|
|
11
|
-
var _extends$1 = require('./extends-eed4f016.js');
|
|
12
|
-
require('./_object-sap-171b9ea5.js');
|
|
13
|
-
require('./inherits-cba9c846.js');
|
|
14
|
-
require('./define-property-21887c62.js');
|
|
15
|
-
require('./web.dom.iterable-e34bf324.js');
|
|
16
|
-
require('./typeof-5f52cf64.js');
|
|
17
|
-
require('./_is-array-aa52fa1e.js');
|
|
3
|
+
var asyncToGenerator = require('./asyncToGenerator-77821af0.js');
|
|
4
|
+
var slicedToArray = require('./slicedToArray-067dd3bc.js');
|
|
5
|
+
var _extends = require('./extends-7c86182f.js');
|
|
18
6
|
var React = require('react');
|
|
19
|
-
var
|
|
7
|
+
var reactTwitterEmbed = require('react-twitter-embed');
|
|
8
|
+
var reactFacebook = require('react-facebook');
|
|
9
|
+
var reactSocialIcons = require('./react-social-icons-af932527.js');
|
|
10
|
+
var smoothscroll = require('./smoothscroll-99df7f93.js');
|
|
11
|
+
var urlFor = require('./urlFor.js');
|
|
12
|
+
var moment = require('./moment-aca40de1.js');
|
|
13
|
+
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
|
|
14
|
+
var Breadcrumbs = require('./Breadcrumbs.js');
|
|
15
|
+
var Feature = require('./Feature.js');
|
|
16
|
+
var getSerializers = require('./index-22bdde81.js');
|
|
17
|
+
var BlockContent = require('./BlockContent-36e54d77.js');
|
|
18
|
+
require('./_commonjsHelpers-06173234.js');
|
|
19
|
+
require('./core.get-iterator-method-5643aa10.js');
|
|
20
|
+
require('./web.dom.iterable-d98303e0.js');
|
|
21
|
+
require('./_library-dd23b178.js');
|
|
22
|
+
require('./_iter-detect-b1df62f0.js');
|
|
23
|
+
require('./_object-pie-083f2dd6.js');
|
|
24
|
+
require('prop-types');
|
|
25
|
+
require('./index-efca863c.js');
|
|
26
|
+
require('./toConsumableArray-d7797c2b.js');
|
|
27
|
+
require('react-bootstrap');
|
|
28
|
+
require('./index.es-f3e47207.js');
|
|
29
|
+
require('./visibility-sensor-eb2c5b69.js');
|
|
30
|
+
require('react-dom');
|
|
31
|
+
require('./index-fc2f1ca2.js');
|
|
20
32
|
require('./events-1b438fe7.js');
|
|
21
|
-
require('./index-98e01cb9.js');
|
|
22
|
-
var PropTypes = require('prop-types');
|
|
23
|
-
var PropTypes__default = _interopDefault(PropTypes);
|
|
24
|
-
require('react-bootstrap/Row');
|
|
25
|
-
require('react-bootstrap/Col');
|
|
26
|
-
require('react-bootstrap/Card');
|
|
27
|
-
var moment = require('./moment-575fe24c.js');
|
|
28
33
|
require('next/router');
|
|
29
|
-
require('./
|
|
30
|
-
require('./
|
|
31
|
-
require('./
|
|
32
|
-
require('
|
|
33
|
-
|
|
34
|
-
var urlFor = require('./urlFor-3a61226f.js');
|
|
35
|
-
require('./index-96b3db50.js');
|
|
36
|
-
require('./main-02daeefe.js');
|
|
37
|
-
require('./entities-310b46ee.js');
|
|
38
|
-
require('./stringify-bbc68047.js');
|
|
39
|
-
var asyncToGenerator$1 = require('./asyncToGenerator-df19209d.js');
|
|
40
|
-
require('./Segment.js');
|
|
41
|
-
require('./Beam.js');
|
|
34
|
+
require('./index-eadd5035.js');
|
|
35
|
+
require('./main-025fdc78.js');
|
|
36
|
+
require('./entities-3f9d0f2f.js');
|
|
37
|
+
require('./ADInfeed-9a2e923a.js');
|
|
38
|
+
require('react-bootstrap/Card');
|
|
42
39
|
require('./AdSlot.js');
|
|
43
|
-
require('./
|
|
44
|
-
require('./
|
|
45
|
-
require('./
|
|
40
|
+
require('./debounce-d4a2369b.js');
|
|
41
|
+
require('./isSymbol-03abbdf0.js');
|
|
42
|
+
require('./toNumber-5e1fac58.js');
|
|
43
|
+
require('./Beam.js');
|
|
44
|
+
require('./stringify-f7a37a8d.js');
|
|
45
|
+
require('./Segment.js');
|
|
46
|
+
require('./AuthorComponent-39b37d84.js');
|
|
47
|
+
require('./lodash-f0783643.js');
|
|
48
|
+
require('./ADlgInfeed-957a1996.js');
|
|
46
49
|
require('./getContentCategory-f38a4c00.js');
|
|
47
|
-
require('./
|
|
48
|
-
require('react-bootstrap/
|
|
49
|
-
|
|
50
|
-
var reactSocialIcons = require('./react-social-icons-f7f48f71.js');
|
|
50
|
+
require('./timeDifferenceCalc.js');
|
|
51
|
+
require('react-bootstrap/Breadcrumb');
|
|
52
|
+
require('react-bootstrap/Carousel');
|
|
51
53
|
require('./index-187c967e.js');
|
|
52
|
-
|
|
54
|
+
require('./util-6f784d85.js');
|
|
55
|
+
require('./typeof-567e31ff.js');
|
|
56
|
+
require('./_is-array-54228b29.js');
|
|
57
|
+
require('./brightcove-react-player-loader.es-a195642e.js');
|
|
53
58
|
require('./GroupDeck.js');
|
|
54
|
-
require('
|
|
55
|
-
require('./timeDifferenceCalc.js');
|
|
56
|
-
require('./Pagination-9cb60fba.js');
|
|
57
|
-
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
|
|
58
|
-
require('./iconBase-68959171.js');
|
|
59
|
-
require('./index.esm-90433435.js');
|
|
60
|
-
var getSerializers = require('./index-17c6af5a.js');
|
|
61
|
-
require('./util-f2c1b65b.js');
|
|
62
|
-
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
59
|
+
require('./SocialShare.js');
|
|
63
60
|
require('next/head');
|
|
64
61
|
require('react-share');
|
|
65
|
-
require('./
|
|
66
|
-
require('./_object-to-array-9bac8737.js');
|
|
62
|
+
require('./_object-to-array-ce86cae7.js');
|
|
67
63
|
require('react-bootstrap/Pagination');
|
|
64
|
+
require('react-bootstrap/Button');
|
|
65
|
+
require('react-bootstrap/Row');
|
|
66
|
+
require('react-bootstrap/Col');
|
|
67
|
+
require('./inherits-de66ea16.js');
|
|
68
|
+
require('./_object-sap-d1978572.js');
|
|
69
|
+
require('./define-property-e8404b64.js');
|
|
70
|
+
require('./index.esm-974f47d9.js');
|
|
71
|
+
require('./iconBase-68959171.js');
|
|
68
72
|
require('react-bootstrap/Figure');
|
|
69
73
|
require('react-bootstrap/OverlayTrigger');
|
|
70
74
|
require('react-bootstrap/Tooltip');
|
|
71
75
|
require('react-bootstrap/Popover');
|
|
72
|
-
var inherits$1$1 = require('./inherits-8d29278d.js');
|
|
73
|
-
require('react-bootstrap/Carousel');
|
|
74
|
-
var Feature = require('./Feature.js');
|
|
75
|
-
require('react-bootstrap/Breadcrumb');
|
|
76
|
-
var Breadcrumbs = require('./Breadcrumbs.js');
|
|
77
|
-
|
|
78
|
-
var isRequiredIf_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
79
|
-
Object.defineProperty(exports,'__esModule',{value:!0});var VALIDATOR_ARG_ERROR_MESSAGE='The typeValidator argument must be a function with the signature function(props, propName, componentName).',MESSAGE_ARG_ERROR_MESSAGE='The error message is optional, but must be a string if provided.',propIsRequired=function propIsRequired(a,b,c,d){if('boolean'==typeof a)return a;return 'function'==typeof a?a(b,c,d):!(!0!==!!a)&&!!a},propExists=function propExists(a,b){return Object.hasOwnProperty.call(a,b)},missingPropError=function missingPropError(a,b,c,d){return d?new Error(d):new Error('Required '+a[b]+' `'+b+'`'+(' was not specified in `'+c+'`.'))},guardAgainstInvalidArgTypes=function guardAgainstInvalidArgTypes(a,b){if('function'!=typeof a)throw new TypeError(VALIDATOR_ARG_ERROR_MESSAGE);if(!!b&&'string'!=typeof b)throw new TypeError(MESSAGE_ARG_ERROR_MESSAGE)},isRequiredIf=function isRequiredIf(a,b,c){return guardAgainstInvalidArgTypes(a,c),function(d,e,f){for(var _len=arguments.length,g=Array(3<_len?_len-3:0),_key=3;_key<_len;_key++)g[_key-3]=arguments[_key];return propIsRequired(b,d,e,f)?propExists(d,e)?a.apply(void 0,[d,e,f].concat(g)):missingPropError(d,e,f,c):a.apply(void 0,[d,e,f].concat(g));// Is not required, so just run typeValidator.
|
|
80
|
-
}};exports.default=isRequiredIf;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
var isRequiredIf = _commonjsHelpers.unwrapExports(isRequiredIf_1);
|
|
86
|
-
|
|
87
|
-
var exenv = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
88
|
-
/*!
|
|
89
|
-
Copyright (c) 2015 Jed Watson.
|
|
90
|
-
Based on code that is Copyright 2013-2015, Facebook, Inc.
|
|
91
|
-
All rights reserved.
|
|
92
|
-
*/
|
|
93
|
-
/* global define */
|
|
94
|
-
|
|
95
|
-
(function () {
|
|
96
|
-
|
|
97
|
-
var canUseDOM = !!(
|
|
98
|
-
typeof window !== 'undefined' &&
|
|
99
|
-
window.document &&
|
|
100
|
-
window.document.createElement
|
|
101
|
-
);
|
|
102
|
-
|
|
103
|
-
var ExecutionEnvironment = {
|
|
104
|
-
|
|
105
|
-
canUseDOM: canUseDOM,
|
|
106
|
-
|
|
107
|
-
canUseWorkers: typeof Worker !== 'undefined',
|
|
108
|
-
|
|
109
|
-
canUseEventListeners:
|
|
110
|
-
canUseDOM && !!(window.addEventListener || window.attachEvent),
|
|
111
|
-
|
|
112
|
-
canUseViewport: canUseDOM && !!window.screen
|
|
113
|
-
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
if ( module.exports) {
|
|
117
|
-
module.exports = ExecutionEnvironment;
|
|
118
|
-
} else {
|
|
119
|
-
window.ExecutionEnvironment = ExecutionEnvironment;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
}());
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
var twitterWidgetJs = 'https://platform.twitter.com/widgets.js';
|
|
126
|
-
|
|
127
|
-
var TwitterTimelineEmbed =
|
|
128
|
-
/*#__PURE__*/
|
|
129
|
-
function (_Component) {
|
|
130
|
-
inherits$1$1._inherits(TwitterTimelineEmbed, _Component);
|
|
131
|
-
|
|
132
|
-
function TwitterTimelineEmbed(props) {
|
|
133
|
-
var _this;
|
|
134
|
-
|
|
135
|
-
inherits$1$1._classCallCheck(this, TwitterTimelineEmbed);
|
|
136
|
-
|
|
137
|
-
_this = inherits$1$1._possibleConstructorReturn(this, inherits$1$1._getPrototypeOf(TwitterTimelineEmbed).call(this, props));
|
|
138
|
-
_this.state = {
|
|
139
|
-
isLoading: true
|
|
140
|
-
};
|
|
141
|
-
return _this;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
inherits$1$1._createClass(TwitterTimelineEmbed, [{
|
|
145
|
-
key: "buildChromeOptions",
|
|
146
|
-
value: function buildChromeOptions(options) {
|
|
147
|
-
options.chrome = '';
|
|
148
|
-
|
|
149
|
-
if (this.props.noHeader) {
|
|
150
|
-
options.chrome = options.chrome + ' noheader';
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
if (this.props.noFooter) {
|
|
154
|
-
options.chrome = options.chrome + ' nofooter';
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if (this.props.noBorders) {
|
|
158
|
-
options.chrome = options.chrome + ' noborders';
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
if (this.props.noScrollbar) {
|
|
162
|
-
options.chrome = options.chrome + ' noscrollbar';
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (this.props.transparent) {
|
|
166
|
-
options.chrome = options.chrome + ' transparent';
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return options;
|
|
170
|
-
}
|
|
171
|
-
}, {
|
|
172
|
-
key: "buildOptions",
|
|
173
|
-
value: function buildOptions() {
|
|
174
|
-
var options = Object.assign({}, this.props.options);
|
|
175
|
-
|
|
176
|
-
if (this.props.autoHeight) {
|
|
177
|
-
options.height = this.refs.embedContainer.parentNode.offsetHeight;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
options = Object.assign({}, options, {
|
|
181
|
-
theme: this.props.theme,
|
|
182
|
-
linkColor: this.props.linkColor,
|
|
183
|
-
borderColor: this.props.borderColor,
|
|
184
|
-
lang: this.props.lang
|
|
185
|
-
});
|
|
186
|
-
return options;
|
|
187
|
-
}
|
|
188
|
-
}, {
|
|
189
|
-
key: "renderWidget",
|
|
190
|
-
value: function renderWidget(options) {
|
|
191
|
-
var _this2 = this;
|
|
192
|
-
|
|
193
|
-
var onLoad = this.props.onLoad;
|
|
194
|
-
|
|
195
|
-
if (!this.isMountCanceled) {
|
|
196
|
-
window.twttr.widgets.createTimeline({
|
|
197
|
-
sourceType: this.props.sourceType,
|
|
198
|
-
screenName: this.props.screenName,
|
|
199
|
-
userId: this.props.userId,
|
|
200
|
-
ownerScreenName: this.props.ownerScreenName,
|
|
201
|
-
slug: this.props.slug,
|
|
202
|
-
id: this.props.id || this.props.widgetId,
|
|
203
|
-
url: this.props.url
|
|
204
|
-
}, this.refs.embedContainer, options).then(function (element) {
|
|
205
|
-
_this2.setState({
|
|
206
|
-
isLoading: false
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
if (onLoad) {
|
|
210
|
-
onLoad(element);
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}, {
|
|
216
|
-
key: "componentDidMount",
|
|
217
|
-
value: function componentDidMount() {
|
|
218
|
-
var _this3 = this;
|
|
219
|
-
|
|
220
|
-
if (exenv.canUseDOM) {
|
|
221
|
-
var script = require('scriptjs');
|
|
222
|
-
|
|
223
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
224
|
-
if (!window.twttr) {
|
|
225
|
-
console.error('Failure to load window.twttr in TwitterTimelineEmbed, aborting load.');
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
var options = _this3.buildOptions();
|
|
230
|
-
/** Append chrome options */
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
options = _this3.buildChromeOptions(options);
|
|
234
|
-
|
|
235
|
-
_this3.renderWidget(options);
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}, {
|
|
240
|
-
key: "componentWillUnmount",
|
|
241
|
-
value: function componentWillUnmount() {
|
|
242
|
-
this.isMountCanceled = true;
|
|
243
|
-
}
|
|
244
|
-
}, {
|
|
245
|
-
key: "render",
|
|
246
|
-
value: function render() {
|
|
247
|
-
var isLoading = this.state.isLoading;
|
|
248
|
-
var placeholder = this.props.placeholder;
|
|
249
|
-
return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
|
|
250
|
-
ref: "embedContainer"
|
|
251
|
-
}));
|
|
252
|
-
}
|
|
253
|
-
}]);
|
|
254
|
-
|
|
255
|
-
return TwitterTimelineEmbed;
|
|
256
|
-
}(React.Component);
|
|
257
|
-
|
|
258
|
-
inherits$1$1._defineProperty(TwitterTimelineEmbed, "propTypes", {
|
|
259
|
-
/**
|
|
260
|
-
* This can be either of profile, likes, list, collection, URL, widget
|
|
261
|
-
*/
|
|
262
|
-
sourceType: PropTypes__default.oneOf(['profile', 'likes', 'list', 'collection', 'url', 'widget']).isRequired,
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* username of twitter handle as String
|
|
266
|
-
*/
|
|
267
|
-
screenName: isRequiredIf(PropTypes__default.string, function (props) {
|
|
268
|
-
return !props.hasOwnProperty('userId') && (props.sourceType === 'profile' || props.sourceType === 'likes');
|
|
269
|
-
}),
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* UserId of twitter handle as number
|
|
273
|
-
*/
|
|
274
|
-
userId: isRequiredIf(PropTypes__default.number, function (props) {
|
|
275
|
-
return !props.hasOwnProperty('screenName') && (props.sourceType === 'profile' || props.sourceType === 'likes');
|
|
276
|
-
}),
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* To show list, used along with slug
|
|
280
|
-
*/
|
|
281
|
-
ownerScreenName: isRequiredIf(PropTypes__default.string, function (props) {
|
|
282
|
-
return props.sourceType === 'list' && !props.hasOwnProperty('id');
|
|
283
|
-
}),
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* To show list, used along with ownerScreenName
|
|
287
|
-
*/
|
|
288
|
-
slug: isRequiredIf(PropTypes__default.string, function (props) {
|
|
289
|
-
return props.sourceType === 'list' && !props.hasOwnProperty('id');
|
|
290
|
-
}),
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* To show list, unique list id
|
|
294
|
-
* Also used with collections, in that case its valid collection id
|
|
295
|
-
*/
|
|
296
|
-
id: isRequiredIf(PropTypes__default.oneOfType([PropTypes__default.number, PropTypes__default.string]), function (props) {
|
|
297
|
-
return props.sourceType === 'list' && !props.hasOwnProperty('ownerScreenName') && !props.hasOwnProperty('slug') || props.sourceType === 'collection';
|
|
298
|
-
}),
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* To show twitter content with url.
|
|
302
|
-
* Supported content includes profiles, likes, lists, and collections.
|
|
303
|
-
*/
|
|
304
|
-
url: isRequiredIf(PropTypes__default.string, function (props) {
|
|
305
|
-
return props.sourceType === 'url';
|
|
306
|
-
}),
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* To show custom widget
|
|
310
|
-
*/
|
|
311
|
-
widgetId: isRequiredIf(PropTypes__default.string, function (props) {
|
|
312
|
-
return props.sourceType === 'widget';
|
|
313
|
-
}),
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Additional options to pass to twitter widget plugin
|
|
317
|
-
*/
|
|
318
|
-
options: PropTypes__default.object,
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* Automatically fit into parent container height
|
|
322
|
-
*/
|
|
323
|
-
autoHeight: PropTypes__default.bool,
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* With dark or light theme
|
|
327
|
-
*/
|
|
328
|
-
theme: PropTypes__default.oneOf(['dark', 'light']),
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* With custom link colors. Note: Only Hex colors are supported.
|
|
332
|
-
*/
|
|
333
|
-
linkColor: PropTypes__default.string,
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* With custom border colors. Note: Only Hex colors are supported.
|
|
337
|
-
*/
|
|
338
|
-
borderColor: PropTypes__default.string,
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* Hide the header from timeline
|
|
342
|
-
*/
|
|
343
|
-
noHeader: PropTypes__default.bool,
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Hide the footer from timeline
|
|
347
|
-
*/
|
|
348
|
-
noFooter: PropTypes__default.bool,
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* Hide the border from timeline
|
|
352
|
-
*/
|
|
353
|
-
noBorders: PropTypes__default.bool,
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* Hide the scrollbars
|
|
357
|
-
*/
|
|
358
|
-
noScrollbar: PropTypes__default.bool,
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Enable Transparancy
|
|
362
|
-
*/
|
|
363
|
-
transparent: PropTypes__default.bool,
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Custom language code. Supported codes here: https://developer.twitter.com/en/docs/twitter-for-websites/twitter-for-websites-supported-languages/overview.html
|
|
367
|
-
*/
|
|
368
|
-
lang: PropTypes__default.string,
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Placeholder while tweet is loading
|
|
372
|
-
*/
|
|
373
|
-
placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Function to execute after load, return html element
|
|
377
|
-
*/
|
|
378
|
-
onLoad: PropTypes__default.func
|
|
379
|
-
});
|
|
380
|
-
|
|
381
|
-
var TwitterShareButton =
|
|
382
|
-
/*#__PURE__*/
|
|
383
|
-
function (_Component) {
|
|
384
|
-
inherits$1$1._inherits(TwitterShareButton, _Component);
|
|
385
|
-
|
|
386
|
-
function TwitterShareButton(props) {
|
|
387
|
-
var _this;
|
|
388
|
-
|
|
389
|
-
inherits$1$1._classCallCheck(this, TwitterShareButton);
|
|
390
|
-
|
|
391
|
-
_this = inherits$1$1._possibleConstructorReturn(this, inherits$1$1._getPrototypeOf(TwitterShareButton).call(this, props));
|
|
392
|
-
_this.state = {
|
|
393
|
-
isLoading: true
|
|
394
|
-
};
|
|
395
|
-
return _this;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
inherits$1$1._createClass(TwitterShareButton, [{
|
|
399
|
-
key: "componentDidMount",
|
|
400
|
-
value: function componentDidMount() {
|
|
401
|
-
var _this2 = this;
|
|
402
|
-
|
|
403
|
-
var onLoad = this.props.onLoad;
|
|
404
|
-
|
|
405
|
-
if (exenv.canUseDOM) {
|
|
406
|
-
var script = require('scriptjs');
|
|
407
|
-
|
|
408
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
409
|
-
if (!window.twttr) {
|
|
410
|
-
console.error('Failure to load window.twttr in TwitterShareButton, aborting load.');
|
|
411
|
-
return;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
if (!_this2.isMountCanceled) {
|
|
415
|
-
window.twttr.widgets.createShareButton(_this2.props.url, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
416
|
-
_this2.setState({
|
|
417
|
-
isLoading: false
|
|
418
|
-
});
|
|
419
|
-
|
|
420
|
-
if (onLoad) {
|
|
421
|
-
onLoad(element);
|
|
422
|
-
}
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
});
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
}, {
|
|
429
|
-
key: "componentWillUnmount",
|
|
430
|
-
value: function componentWillUnmount() {
|
|
431
|
-
this.isMountCanceled = true;
|
|
432
|
-
}
|
|
433
|
-
}, {
|
|
434
|
-
key: "render",
|
|
435
|
-
value: function render() {
|
|
436
|
-
var isLoading = this.state.isLoading;
|
|
437
|
-
var placeholder = this.props.placeholder;
|
|
438
|
-
return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
|
|
439
|
-
ref: "embedContainer"
|
|
440
|
-
}));
|
|
441
|
-
}
|
|
442
|
-
}]);
|
|
443
|
-
|
|
444
|
-
return TwitterShareButton;
|
|
445
|
-
}(React.Component);
|
|
446
|
-
|
|
447
|
-
inherits$1$1._defineProperty(TwitterShareButton, "propTypes", {
|
|
448
|
-
/**
|
|
449
|
-
* Url for sharing
|
|
450
|
-
*/
|
|
451
|
-
url: PropTypes__default.string.isRequired,
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* Additional options for overriding config. Details at : https://dev.twitter.com/web/tweet-button/parameters
|
|
455
|
-
*/
|
|
456
|
-
options: PropTypes__default.object,
|
|
457
|
-
|
|
458
|
-
/**
|
|
459
|
-
* Placeholder while tweet is loading
|
|
460
|
-
*/
|
|
461
|
-
placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* Function to execute after load, return html element
|
|
465
|
-
*/
|
|
466
|
-
onLoad: PropTypes__default.func
|
|
467
|
-
});
|
|
468
|
-
|
|
469
|
-
var TwitterFollowButton =
|
|
470
|
-
/*#__PURE__*/
|
|
471
|
-
function (_Component) {
|
|
472
|
-
inherits$1$1._inherits(TwitterFollowButton, _Component);
|
|
473
|
-
|
|
474
|
-
function TwitterFollowButton(props) {
|
|
475
|
-
var _this;
|
|
476
|
-
|
|
477
|
-
inherits$1$1._classCallCheck(this, TwitterFollowButton);
|
|
478
|
-
|
|
479
|
-
_this = inherits$1$1._possibleConstructorReturn(this, inherits$1$1._getPrototypeOf(TwitterFollowButton).call(this, props));
|
|
480
|
-
_this.state = {
|
|
481
|
-
isLoading: true
|
|
482
|
-
};
|
|
483
|
-
return _this;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
inherits$1$1._createClass(TwitterFollowButton, [{
|
|
487
|
-
key: "componentDidMount",
|
|
488
|
-
value: function componentDidMount() {
|
|
489
|
-
var _this2 = this;
|
|
490
|
-
|
|
491
|
-
var onLoad = this.props.onLoad;
|
|
492
|
-
|
|
493
|
-
if (exenv.canUseDOM) {
|
|
494
|
-
var script = require('scriptjs');
|
|
495
|
-
|
|
496
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
497
|
-
if (!window.twttr) {
|
|
498
|
-
console.error('Failure to load window.twttr in TwitterFollowButton, aborting load.');
|
|
499
|
-
return;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
if (!_this2.isMountCanceled) {
|
|
503
|
-
window.twttr.widgets.createFollowButton(_this2.props.screenName, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
504
|
-
_this2.setState({
|
|
505
|
-
isLoading: false
|
|
506
|
-
});
|
|
507
|
-
|
|
508
|
-
if (onLoad) {
|
|
509
|
-
onLoad(element);
|
|
510
|
-
}
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
}, {
|
|
517
|
-
key: "componentWillUnmount",
|
|
518
|
-
value: function componentWillUnmount() {
|
|
519
|
-
this.isMountCanceled = true;
|
|
520
|
-
}
|
|
521
|
-
}, {
|
|
522
|
-
key: "render",
|
|
523
|
-
value: function render() {
|
|
524
|
-
var isLoading = this.state.isLoading;
|
|
525
|
-
var placeholder = this.props.placeholder;
|
|
526
|
-
return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
|
|
527
|
-
ref: "embedContainer"
|
|
528
|
-
}));
|
|
529
|
-
}
|
|
530
|
-
}]);
|
|
531
|
-
|
|
532
|
-
return TwitterFollowButton;
|
|
533
|
-
}(React.Component);
|
|
534
|
-
|
|
535
|
-
inherits$1$1._defineProperty(TwitterFollowButton, "propTypes", {
|
|
536
|
-
/**
|
|
537
|
-
* Username of twitter user which will be followed on click
|
|
538
|
-
*/
|
|
539
|
-
screenName: PropTypes__default.string.isRequired,
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* Additional options to be added to the button
|
|
543
|
-
*/
|
|
544
|
-
options: PropTypes__default.object,
|
|
545
|
-
|
|
546
|
-
/**
|
|
547
|
-
* Placeholder while tweet is loading
|
|
548
|
-
*/
|
|
549
|
-
placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
|
|
550
|
-
|
|
551
|
-
/**
|
|
552
|
-
* Function to execute after load, return html element
|
|
553
|
-
*/
|
|
554
|
-
onLoad: PropTypes__default.func
|
|
555
|
-
});
|
|
556
|
-
|
|
557
|
-
var TwitterHashtagButton =
|
|
558
|
-
/*#__PURE__*/
|
|
559
|
-
function (_Component) {
|
|
560
|
-
inherits$1$1._inherits(TwitterHashtagButton, _Component);
|
|
561
|
-
|
|
562
|
-
function TwitterHashtagButton(props) {
|
|
563
|
-
var _this;
|
|
564
|
-
|
|
565
|
-
inherits$1$1._classCallCheck(this, TwitterHashtagButton);
|
|
566
|
-
|
|
567
|
-
_this = inherits$1$1._possibleConstructorReturn(this, inherits$1$1._getPrototypeOf(TwitterHashtagButton).call(this, props));
|
|
568
|
-
_this.state = {
|
|
569
|
-
isLoading: true
|
|
570
|
-
};
|
|
571
|
-
return _this;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
inherits$1$1._createClass(TwitterHashtagButton, [{
|
|
575
|
-
key: "componentDidMount",
|
|
576
|
-
value: function componentDidMount() {
|
|
577
|
-
var _this2 = this;
|
|
578
|
-
|
|
579
|
-
var onLoad = this.props.onLoad;
|
|
580
|
-
|
|
581
|
-
if (exenv.canUseDOM) {
|
|
582
|
-
var script = require('scriptjs');
|
|
583
|
-
|
|
584
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
585
|
-
if (!window.twttr) {
|
|
586
|
-
console.error('Failure to load window.twttr in TwitterHashtagButton, aborting load.');
|
|
587
|
-
return;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
if (!_this2.isMountCanceled) {
|
|
591
|
-
window.twttr.widgets.createHashtagButton(_this2.props.tag, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
592
|
-
_this2.setState({
|
|
593
|
-
isLoading: false
|
|
594
|
-
});
|
|
595
|
-
|
|
596
|
-
if (onLoad) {
|
|
597
|
-
onLoad(element);
|
|
598
|
-
}
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
});
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
}, {
|
|
605
|
-
key: "componentWillUnmount",
|
|
606
|
-
value: function componentWillUnmount() {
|
|
607
|
-
this.isMountCanceled = true;
|
|
608
|
-
}
|
|
609
|
-
}, {
|
|
610
|
-
key: "render",
|
|
611
|
-
value: function render() {
|
|
612
|
-
var isLoading = this.state.isLoading;
|
|
613
|
-
var placeholder = this.props.placeholder;
|
|
614
|
-
return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
|
|
615
|
-
ref: "embedContainer"
|
|
616
|
-
}));
|
|
617
|
-
}
|
|
618
|
-
}]);
|
|
619
|
-
|
|
620
|
-
return TwitterHashtagButton;
|
|
621
|
-
}(React.Component);
|
|
622
|
-
|
|
623
|
-
inherits$1$1._defineProperty(TwitterHashtagButton, "propTypes", {
|
|
624
|
-
/**
|
|
625
|
-
* Tag name for hashtag button
|
|
626
|
-
*/
|
|
627
|
-
tag: PropTypes__default.string.isRequired,
|
|
628
|
-
|
|
629
|
-
/**
|
|
630
|
-
* Additional options to be added to the button
|
|
631
|
-
*/
|
|
632
|
-
options: PropTypes__default.object,
|
|
633
|
-
|
|
634
|
-
/**
|
|
635
|
-
* Placeholder while tweet is loading
|
|
636
|
-
*/
|
|
637
|
-
placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
|
|
638
|
-
|
|
639
|
-
/**
|
|
640
|
-
* Function to execute after load, return html element
|
|
641
|
-
*/
|
|
642
|
-
onLoad: PropTypes__default.func
|
|
643
|
-
});
|
|
644
|
-
|
|
645
|
-
var TwitterMentionButton =
|
|
646
|
-
/*#__PURE__*/
|
|
647
|
-
function (_Component) {
|
|
648
|
-
inherits$1$1._inherits(TwitterMentionButton, _Component);
|
|
649
|
-
|
|
650
|
-
function TwitterMentionButton(props) {
|
|
651
|
-
var _this;
|
|
652
|
-
|
|
653
|
-
inherits$1$1._classCallCheck(this, TwitterMentionButton);
|
|
654
|
-
|
|
655
|
-
_this = inherits$1$1._possibleConstructorReturn(this, inherits$1$1._getPrototypeOf(TwitterMentionButton).call(this, props));
|
|
656
|
-
_this.state = {
|
|
657
|
-
isLoading: true
|
|
658
|
-
};
|
|
659
|
-
return _this;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
inherits$1$1._createClass(TwitterMentionButton, [{
|
|
663
|
-
key: "componentDidMount",
|
|
664
|
-
value: function componentDidMount() {
|
|
665
|
-
var _this2 = this;
|
|
666
|
-
|
|
667
|
-
var onLoad = this.props.onLoad;
|
|
668
|
-
|
|
669
|
-
if (exenv.canUseDOM) {
|
|
670
|
-
var script = require('scriptjs');
|
|
671
|
-
|
|
672
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
673
|
-
if (!window.twttr) {
|
|
674
|
-
console.error('Failure to load window.twttr in TwitterMentionButton, aborting load.');
|
|
675
|
-
return;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
if (!_this2.isMountCanceled) {
|
|
679
|
-
window.twttr.widgets.createMentionButton(_this2.props.screenName, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
680
|
-
_this2.setState({
|
|
681
|
-
isLoading: false
|
|
682
|
-
});
|
|
683
|
-
|
|
684
|
-
if (onLoad) {
|
|
685
|
-
onLoad(element);
|
|
686
|
-
}
|
|
687
|
-
});
|
|
688
|
-
}
|
|
689
|
-
});
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
}, {
|
|
693
|
-
key: "componentWillUnmount",
|
|
694
|
-
value: function componentWillUnmount() {
|
|
695
|
-
this.isMountCanceled = true;
|
|
696
|
-
}
|
|
697
|
-
}, {
|
|
698
|
-
key: "render",
|
|
699
|
-
value: function render() {
|
|
700
|
-
var isLoading = this.state.isLoading;
|
|
701
|
-
var placeholder = this.props.placeholder;
|
|
702
|
-
return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
|
|
703
|
-
ref: "embedContainer"
|
|
704
|
-
}));
|
|
705
|
-
}
|
|
706
|
-
}]);
|
|
707
|
-
|
|
708
|
-
return TwitterMentionButton;
|
|
709
|
-
}(React.Component);
|
|
710
|
-
|
|
711
|
-
inherits$1$1._defineProperty(TwitterMentionButton, "propTypes", {
|
|
712
|
-
/**
|
|
713
|
-
* Username to which you will need to tweet
|
|
714
|
-
*/
|
|
715
|
-
screenName: PropTypes__default.string.isRequired,
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* Additional options for overriding config.
|
|
719
|
-
*/
|
|
720
|
-
options: PropTypes__default.object,
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* Placeholder while tweet is loading
|
|
724
|
-
*/
|
|
725
|
-
placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
|
|
726
|
-
|
|
727
|
-
/**
|
|
728
|
-
* Function to execute after load, return html element
|
|
729
|
-
*/
|
|
730
|
-
onLoad: PropTypes__default.func
|
|
731
|
-
});
|
|
732
|
-
|
|
733
|
-
var TwitterTweetEmbed =
|
|
734
|
-
/*#__PURE__*/
|
|
735
|
-
function (_Component) {
|
|
736
|
-
inherits$1$1._inherits(TwitterTweetEmbed, _Component);
|
|
737
|
-
|
|
738
|
-
function TwitterTweetEmbed(props) {
|
|
739
|
-
var _this;
|
|
740
|
-
|
|
741
|
-
inherits$1$1._classCallCheck(this, TwitterTweetEmbed);
|
|
742
|
-
|
|
743
|
-
_this = inherits$1$1._possibleConstructorReturn(this, inherits$1$1._getPrototypeOf(TwitterTweetEmbed).call(this, props));
|
|
744
|
-
_this.state = {
|
|
745
|
-
isLoading: true
|
|
746
|
-
};
|
|
747
|
-
return _this;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
inherits$1$1._createClass(TwitterTweetEmbed, [{
|
|
751
|
-
key: "renderWidget",
|
|
752
|
-
value: function renderWidget() {
|
|
753
|
-
var _this2 = this;
|
|
754
|
-
|
|
755
|
-
var onLoad = this.props.onLoad;
|
|
756
|
-
|
|
757
|
-
if (!window.twttr) {
|
|
758
|
-
console.error('Failure to load window.twttr in TwitterTweetEmbed, aborting load.');
|
|
759
|
-
return;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
if (!this.isMountCanceled) {
|
|
763
|
-
window.twttr.widgets.createTweet(this.props.tweetId, this.refs.embedContainer, this.props.options).then(function (element) {
|
|
764
|
-
_this2.setState({
|
|
765
|
-
isLoading: false
|
|
766
|
-
});
|
|
767
|
-
|
|
768
|
-
if (onLoad) {
|
|
769
|
-
onLoad(element);
|
|
770
|
-
}
|
|
771
|
-
});
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
}, {
|
|
775
|
-
key: "componentDidMount",
|
|
776
|
-
value: function componentDidMount() {
|
|
777
|
-
var _this3 = this;
|
|
778
|
-
|
|
779
|
-
if (exenv.canUseDOM) {
|
|
780
|
-
var script = require('scriptjs');
|
|
781
|
-
|
|
782
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
783
|
-
_this3.renderWidget();
|
|
784
|
-
});
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
}, {
|
|
788
|
-
key: "componentWillUnmount",
|
|
789
|
-
value: function componentWillUnmount() {
|
|
790
|
-
this.isMountCanceled = true;
|
|
791
|
-
}
|
|
792
|
-
}, {
|
|
793
|
-
key: "render",
|
|
794
|
-
value: function render() {
|
|
795
|
-
var isLoading = this.state.isLoading;
|
|
796
|
-
var placeholder = this.props.placeholder;
|
|
797
|
-
return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
|
|
798
|
-
ref: "embedContainer"
|
|
799
|
-
}));
|
|
800
|
-
}
|
|
801
|
-
}]);
|
|
802
|
-
|
|
803
|
-
return TwitterTweetEmbed;
|
|
804
|
-
}(React.Component);
|
|
805
|
-
|
|
806
|
-
inherits$1$1._defineProperty(TwitterTweetEmbed, "propTypes", {
|
|
807
|
-
/**
|
|
808
|
-
* Tweet id that needs to be shown
|
|
809
|
-
*/
|
|
810
|
-
tweetId: PropTypes__default.string.isRequired,
|
|
811
|
-
|
|
812
|
-
/**
|
|
813
|
-
* Additional options to pass to twitter widget plugin
|
|
814
|
-
*/
|
|
815
|
-
options: PropTypes__default.object,
|
|
816
|
-
|
|
817
|
-
/**
|
|
818
|
-
* Placeholder while tweet is loading
|
|
819
|
-
*/
|
|
820
|
-
placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
|
|
821
|
-
|
|
822
|
-
/**
|
|
823
|
-
* Function to execute after load, return html element
|
|
824
|
-
*/
|
|
825
|
-
onLoad: PropTypes__default.func
|
|
826
|
-
});
|
|
827
|
-
|
|
828
|
-
var TwitterMomentShare =
|
|
829
|
-
/*#__PURE__*/
|
|
830
|
-
function (_Component) {
|
|
831
|
-
inherits$1$1._inherits(TwitterMomentShare, _Component);
|
|
832
|
-
|
|
833
|
-
function TwitterMomentShare(props) {
|
|
834
|
-
var _this;
|
|
835
|
-
|
|
836
|
-
inherits$1$1._classCallCheck(this, TwitterMomentShare);
|
|
837
|
-
|
|
838
|
-
_this = inherits$1$1._possibleConstructorReturn(this, inherits$1$1._getPrototypeOf(TwitterMomentShare).call(this, props));
|
|
839
|
-
_this.state = {
|
|
840
|
-
isLoading: true
|
|
841
|
-
};
|
|
842
|
-
return _this;
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
inherits$1$1._createClass(TwitterMomentShare, [{
|
|
846
|
-
key: "componentDidMount",
|
|
847
|
-
value: function componentDidMount() {
|
|
848
|
-
var _this2 = this;
|
|
849
|
-
|
|
850
|
-
var onLoad = this.props.onLoad;
|
|
851
|
-
|
|
852
|
-
if (exenv.canUseDOM) {
|
|
853
|
-
var script = require('scriptjs');
|
|
854
|
-
|
|
855
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
856
|
-
if (!window.twttr) {
|
|
857
|
-
console.error('Failure to load window.twttr in TwitterMomentShare, aborting load.');
|
|
858
|
-
return;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
if (!_this2.isMountCanceled) {
|
|
862
|
-
window.twttr.widgets.createMoment(_this2.props.momentId, _this2.refs.shareMoment, _this2.props.options).then(function (element) {
|
|
863
|
-
_this2.setState({
|
|
864
|
-
isLoading: false
|
|
865
|
-
});
|
|
866
|
-
|
|
867
|
-
if (onLoad) {
|
|
868
|
-
onLoad(element);
|
|
869
|
-
}
|
|
870
|
-
});
|
|
871
|
-
}
|
|
872
|
-
});
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
}, {
|
|
876
|
-
key: "componentWillUnmount",
|
|
877
|
-
value: function componentWillUnmount() {
|
|
878
|
-
this.isMountCanceled = true;
|
|
879
|
-
}
|
|
880
|
-
}, {
|
|
881
|
-
key: "render",
|
|
882
|
-
value: function render() {
|
|
883
|
-
var isLoading = this.state.isLoading;
|
|
884
|
-
var placeholder = this.props.placeholder;
|
|
885
|
-
return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
|
|
886
|
-
ref: "shareMoment"
|
|
887
|
-
}));
|
|
888
|
-
}
|
|
889
|
-
}]);
|
|
890
|
-
|
|
891
|
-
return TwitterMomentShare;
|
|
892
|
-
}(React.Component);
|
|
893
|
-
|
|
894
|
-
inherits$1$1._defineProperty(TwitterMomentShare, "propTypes", {
|
|
895
|
-
/**
|
|
896
|
-
* id of Twitter moment to show
|
|
897
|
-
*/
|
|
898
|
-
momentId: PropTypes__default.string.isRequired,
|
|
899
|
-
|
|
900
|
-
/**
|
|
901
|
-
* Additional options for overriding config.
|
|
902
|
-
*/
|
|
903
|
-
options: PropTypes__default.object,
|
|
904
|
-
|
|
905
|
-
/**
|
|
906
|
-
* Placeholder while tweet is loading
|
|
907
|
-
*/
|
|
908
|
-
placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
|
|
909
|
-
|
|
910
|
-
/**
|
|
911
|
-
* Function to execute after load, return html element
|
|
912
|
-
*/
|
|
913
|
-
onLoad: PropTypes__default.func
|
|
914
|
-
});
|
|
915
|
-
|
|
916
|
-
var TwitterDMButton =
|
|
917
|
-
/*#__PURE__*/
|
|
918
|
-
function (_Component) {
|
|
919
|
-
inherits$1$1._inherits(TwitterDMButton, _Component);
|
|
920
|
-
|
|
921
|
-
function TwitterDMButton(props) {
|
|
922
|
-
var _this;
|
|
923
|
-
|
|
924
|
-
inherits$1$1._classCallCheck(this, TwitterDMButton);
|
|
925
|
-
|
|
926
|
-
_this = inherits$1$1._possibleConstructorReturn(this, inherits$1$1._getPrototypeOf(TwitterDMButton).call(this, props));
|
|
927
|
-
_this.state = {
|
|
928
|
-
isLoading: true
|
|
929
|
-
};
|
|
930
|
-
return _this;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
inherits$1$1._createClass(TwitterDMButton, [{
|
|
934
|
-
key: "componentDidMount",
|
|
935
|
-
value: function componentDidMount() {
|
|
936
|
-
var _this2 = this;
|
|
937
|
-
|
|
938
|
-
var onLoad = this.props.onLoad;
|
|
939
|
-
|
|
940
|
-
if (exenv.canUseDOM) {
|
|
941
|
-
var script = require('scriptjs');
|
|
942
|
-
|
|
943
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
944
|
-
if (!window.twttr) {
|
|
945
|
-
console.error('Failure to load window.twttr in TwitterDMButton, aborting load.');
|
|
946
|
-
return;
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
if (!_this2.isMountCanceled) {
|
|
950
|
-
window.twttr.widgets.createDMButton(_this2.props.id, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
951
|
-
_this2.setState({
|
|
952
|
-
isLoading: false
|
|
953
|
-
});
|
|
954
|
-
|
|
955
|
-
if (onLoad) {
|
|
956
|
-
onLoad(element);
|
|
957
|
-
}
|
|
958
|
-
});
|
|
959
|
-
}
|
|
960
|
-
});
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
}, {
|
|
964
|
-
key: "componentWillUnmount",
|
|
965
|
-
value: function componentWillUnmount() {
|
|
966
|
-
this.isMountCanceled = true;
|
|
967
|
-
}
|
|
968
|
-
}, {
|
|
969
|
-
key: "render",
|
|
970
|
-
value: function render() {
|
|
971
|
-
var isLoading = this.state.isLoading;
|
|
972
|
-
var placeholder = this.props.placeholder;
|
|
973
|
-
return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
|
|
974
|
-
ref: "embedContainer"
|
|
975
|
-
}));
|
|
976
|
-
}
|
|
977
|
-
}]);
|
|
978
|
-
|
|
979
|
-
return TwitterDMButton;
|
|
980
|
-
}(React.Component);
|
|
981
|
-
|
|
982
|
-
inherits$1$1._defineProperty(TwitterDMButton, "propTypes", {
|
|
983
|
-
/**
|
|
984
|
-
* Twitter user id for DM button
|
|
985
|
-
*/
|
|
986
|
-
id: PropTypes__default.number.isRequired,
|
|
987
|
-
|
|
988
|
-
/**
|
|
989
|
-
* Additional options to be added to the button
|
|
990
|
-
*/
|
|
991
|
-
options: PropTypes__default.object,
|
|
992
|
-
|
|
993
|
-
/**
|
|
994
|
-
* Placeholder while tweet is loading
|
|
995
|
-
*/
|
|
996
|
-
placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
|
|
997
|
-
|
|
998
|
-
/**
|
|
999
|
-
* Function to execute after load, return html element
|
|
1000
|
-
*/
|
|
1001
|
-
onLoad: PropTypes__default.func
|
|
1002
|
-
});
|
|
1003
|
-
|
|
1004
|
-
var TwitterVideoEmbed =
|
|
1005
|
-
/*#__PURE__*/
|
|
1006
|
-
function (_Component) {
|
|
1007
|
-
inherits$1$1._inherits(TwitterVideoEmbed, _Component);
|
|
1008
|
-
|
|
1009
|
-
function TwitterVideoEmbed(props) {
|
|
1010
|
-
var _this;
|
|
1011
|
-
|
|
1012
|
-
inherits$1$1._classCallCheck(this, TwitterVideoEmbed);
|
|
1013
|
-
|
|
1014
|
-
_this = inherits$1$1._possibleConstructorReturn(this, inherits$1$1._getPrototypeOf(TwitterVideoEmbed).call(this, props));
|
|
1015
|
-
_this.state = {
|
|
1016
|
-
isLoading: true
|
|
1017
|
-
};
|
|
1018
|
-
return _this;
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
inherits$1$1._createClass(TwitterVideoEmbed, [{
|
|
1022
|
-
key: "componentDidMount",
|
|
1023
|
-
value: function componentDidMount() {
|
|
1024
|
-
var _this2 = this;
|
|
1025
|
-
|
|
1026
|
-
var onLoad = this.props.onLoad;
|
|
1027
|
-
|
|
1028
|
-
if (exenv.canUseDOM) {
|
|
1029
|
-
var script = require('scriptjs');
|
|
1030
|
-
|
|
1031
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
1032
|
-
if (!window.twttr) {
|
|
1033
|
-
console.error('Failure to load window.twttr in TwitterVideoEmbed, aborting load.');
|
|
1034
|
-
return;
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
if (!_this2.isMountCanceled) {
|
|
1038
|
-
window.twttr.widgets.createVideo(_this2.props.id, _this2.refs.embedContainer).then(function (element) {
|
|
1039
|
-
_this2.setState({
|
|
1040
|
-
isLoading: false
|
|
1041
|
-
});
|
|
1042
|
-
|
|
1043
|
-
if (onLoad) {
|
|
1044
|
-
onLoad(element);
|
|
1045
|
-
}
|
|
1046
|
-
});
|
|
1047
|
-
}
|
|
1048
|
-
});
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
}, {
|
|
1052
|
-
key: "componentWillUnmount",
|
|
1053
|
-
value: function componentWillUnmount() {
|
|
1054
|
-
this.isMountCanceled = true;
|
|
1055
|
-
}
|
|
1056
|
-
}, {
|
|
1057
|
-
key: "render",
|
|
1058
|
-
value: function render() {
|
|
1059
|
-
var isLoading = this.state.isLoading;
|
|
1060
|
-
var placeholder = this.props.placeholder;
|
|
1061
|
-
return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
|
|
1062
|
-
ref: "embedContainer"
|
|
1063
|
-
}));
|
|
1064
|
-
}
|
|
1065
|
-
}]);
|
|
1066
|
-
|
|
1067
|
-
return TwitterVideoEmbed;
|
|
1068
|
-
}(React.Component);
|
|
1069
|
-
|
|
1070
|
-
inherits$1$1._defineProperty(TwitterVideoEmbed, "propTypes", {
|
|
1071
|
-
/**
|
|
1072
|
-
* Id of video tweet.
|
|
1073
|
-
*/
|
|
1074
|
-
id: PropTypes__default.string.isRequired,
|
|
1075
|
-
|
|
1076
|
-
/**
|
|
1077
|
-
* Placeholder while tweet is loading
|
|
1078
|
-
*/
|
|
1079
|
-
placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
|
|
1080
|
-
|
|
1081
|
-
/**
|
|
1082
|
-
* Function to execute after load, return html element
|
|
1083
|
-
*/
|
|
1084
|
-
onLoad: PropTypes__default.func
|
|
1085
|
-
});
|
|
1086
|
-
|
|
1087
|
-
var TwitterOnAirButton =
|
|
1088
|
-
/*#__PURE__*/
|
|
1089
|
-
function (_Component) {
|
|
1090
|
-
inherits$1$1._inherits(TwitterOnAirButton, _Component);
|
|
1091
|
-
|
|
1092
|
-
function TwitterOnAirButton(props) {
|
|
1093
|
-
var _this;
|
|
1094
|
-
|
|
1095
|
-
inherits$1$1._classCallCheck(this, TwitterOnAirButton);
|
|
1096
|
-
|
|
1097
|
-
_this = inherits$1$1._possibleConstructorReturn(this, inherits$1$1._getPrototypeOf(TwitterOnAirButton).call(this, props));
|
|
1098
|
-
_this.state = {
|
|
1099
|
-
isLoading: true
|
|
1100
|
-
};
|
|
1101
|
-
return _this;
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
inherits$1$1._createClass(TwitterOnAirButton, [{
|
|
1105
|
-
key: "componentDidMount",
|
|
1106
|
-
value: function componentDidMount() {
|
|
1107
|
-
var _this2 = this;
|
|
1108
|
-
|
|
1109
|
-
var onLoad = this.props.onLoad;
|
|
1110
|
-
|
|
1111
|
-
if (exenv.canUseDOM) {
|
|
1112
|
-
var script = require('scriptjs');
|
|
1113
|
-
|
|
1114
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
1115
|
-
if (!window.twttr) {
|
|
1116
|
-
console.error('Failure to load window.twttr in TwitterOnAirButton, aborting load.');
|
|
1117
|
-
return;
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
if (!_this2.isMountCanceled) {
|
|
1121
|
-
window.twttr.widgets.createPeriscopeOnAirButton(_this2.props.username, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
1122
|
-
_this2.setState({
|
|
1123
|
-
isLoading: false
|
|
1124
|
-
});
|
|
1125
|
-
|
|
1126
|
-
if (onLoad) {
|
|
1127
|
-
onLoad(element);
|
|
1128
|
-
}
|
|
1129
|
-
});
|
|
1130
|
-
}
|
|
1131
|
-
});
|
|
1132
|
-
}
|
|
1133
|
-
}
|
|
1134
|
-
}, {
|
|
1135
|
-
key: "componentWillUnmount",
|
|
1136
|
-
value: function componentWillUnmount() {
|
|
1137
|
-
this.isMountCanceled = true;
|
|
1138
|
-
}
|
|
1139
|
-
}, {
|
|
1140
|
-
key: "render",
|
|
1141
|
-
value: function render() {
|
|
1142
|
-
var isLoading = this.state.isLoading;
|
|
1143
|
-
var placeholder = this.props.placeholder;
|
|
1144
|
-
return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
|
|
1145
|
-
ref: "embedContainer"
|
|
1146
|
-
}));
|
|
1147
|
-
}
|
|
1148
|
-
}]);
|
|
1149
|
-
|
|
1150
|
-
return TwitterOnAirButton;
|
|
1151
|
-
}(React.Component);
|
|
1152
|
-
|
|
1153
|
-
inherits$1$1._defineProperty(TwitterOnAirButton, "propTypes", {
|
|
1154
|
-
/**
|
|
1155
|
-
* Username for which you require periscope on air button
|
|
1156
|
-
*/
|
|
1157
|
-
username: PropTypes__default.string.isRequired,
|
|
1158
|
-
|
|
1159
|
-
/**
|
|
1160
|
-
* Additional options for overriding config.
|
|
1161
|
-
*/
|
|
1162
|
-
options: PropTypes__default.object,
|
|
1163
|
-
|
|
1164
|
-
/**
|
|
1165
|
-
* Placeholder while tweet is loading
|
|
1166
|
-
*/
|
|
1167
|
-
placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
|
|
1168
|
-
|
|
1169
|
-
/**
|
|
1170
|
-
* Function to execute after load, return html element
|
|
1171
|
-
*/
|
|
1172
|
-
onLoad: PropTypes__default.func
|
|
1173
|
-
});
|
|
1174
|
-
|
|
1175
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
1176
|
-
try {
|
|
1177
|
-
var info = gen[key](arg);
|
|
1178
|
-
var value = info.value;
|
|
1179
|
-
} catch (error) {
|
|
1180
|
-
reject(error);
|
|
1181
|
-
return;
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
if (info.done) {
|
|
1185
|
-
resolve(value);
|
|
1186
|
-
} else {
|
|
1187
|
-
Promise.resolve(value).then(_next, _throw);
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
function _asyncToGenerator(fn) {
|
|
1192
|
-
return function () {
|
|
1193
|
-
var self = this,
|
|
1194
|
-
args = arguments;
|
|
1195
|
-
return new Promise(function (resolve, reject) {
|
|
1196
|
-
var gen = fn.apply(self, args);
|
|
1197
|
-
|
|
1198
|
-
function _next(value) {
|
|
1199
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
function _throw(err) {
|
|
1203
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
_next(undefined);
|
|
1207
|
-
});
|
|
1208
|
-
};
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
var asyncToGenerator = _asyncToGenerator;
|
|
1212
|
-
|
|
1213
|
-
function _defineProperty(obj, key, value) {
|
|
1214
|
-
if (key in obj) {
|
|
1215
|
-
Object.defineProperty(obj, key, {
|
|
1216
|
-
value: value,
|
|
1217
|
-
enumerable: true,
|
|
1218
|
-
configurable: true,
|
|
1219
|
-
writable: true
|
|
1220
|
-
});
|
|
1221
|
-
} else {
|
|
1222
|
-
obj[key] = value;
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
|
-
return obj;
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
var defineProperty = _defineProperty;
|
|
1229
|
-
|
|
1230
|
-
var canUseDOM = !!(
|
|
1231
|
-
typeof window !== 'undefined' &&
|
|
1232
|
-
window.document &&
|
|
1233
|
-
window.document.createElement
|
|
1234
|
-
);
|
|
1235
|
-
|
|
1236
|
-
var canUseDom = canUseDOM;
|
|
1237
|
-
|
|
1238
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1239
|
-
if (source == null) return {};
|
|
1240
|
-
var target = {};
|
|
1241
|
-
var sourceKeys = Object.keys(source);
|
|
1242
|
-
var key, i;
|
|
1243
|
-
|
|
1244
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1245
|
-
key = sourceKeys[i];
|
|
1246
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1247
|
-
target[key] = source[key];
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
return target;
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
var objectWithoutPropertiesLoose = _objectWithoutPropertiesLoose;
|
|
1254
|
-
|
|
1255
|
-
function _objectWithoutProperties(source, excluded) {
|
|
1256
|
-
if (source == null) return {};
|
|
1257
|
-
var target = objectWithoutPropertiesLoose(source, excluded);
|
|
1258
|
-
var key, i;
|
|
1259
|
-
|
|
1260
|
-
if (Object.getOwnPropertySymbols) {
|
|
1261
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
1262
|
-
|
|
1263
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
1264
|
-
key = sourceSymbolKeys[i];
|
|
1265
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1266
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
1267
|
-
target[key] = source[key];
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
return target;
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
var objectWithoutProperties = _objectWithoutProperties;
|
|
1275
|
-
|
|
1276
|
-
var LoginStatus = {
|
|
1277
|
-
CONNECTED: 'connected',
|
|
1278
|
-
AUTHORIZATION_EXPIRED: 'authorization_expired',
|
|
1279
|
-
NOT_AUTHORIZED: 'not_authorized',
|
|
1280
|
-
UNKNOWN: 'unknown'
|
|
1281
|
-
};
|
|
1282
|
-
|
|
1283
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
1284
|
-
|
|
1285
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
1286
|
-
const Method = {
|
|
1287
|
-
GET: 'get',
|
|
1288
|
-
POST: 'post',
|
|
1289
|
-
DELETE: 'delete'
|
|
1290
|
-
};
|
|
1291
|
-
class Facebook {
|
|
1292
|
-
constructor(options = {}) {
|
|
1293
|
-
this.options = _objectSpread({
|
|
1294
|
-
domain: 'connect.facebook.net',
|
|
1295
|
-
version: 'v3.2',
|
|
1296
|
-
cookie: false,
|
|
1297
|
-
status: false,
|
|
1298
|
-
xfbml: false,
|
|
1299
|
-
language: 'en_US',
|
|
1300
|
-
frictionlessRequests: false,
|
|
1301
|
-
debug: false,
|
|
1302
|
-
chatSupport: false
|
|
1303
|
-
}, options);
|
|
1304
|
-
|
|
1305
|
-
if (!this.options.appId) {
|
|
1306
|
-
throw new Error('You need to set appId');
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
if (!this.options.wait) {
|
|
1310
|
-
this.init();
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
getAppId() {
|
|
1315
|
-
return this.options.appId;
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
init() {
|
|
1319
|
-
var _this = this;
|
|
1320
|
-
|
|
1321
|
-
return asyncToGenerator(function* () {
|
|
1322
|
-
if (_this.loadingPromise) {
|
|
1323
|
-
return _this.loadingPromise;
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
_this.loadingPromise = new Promise(resolve => {
|
|
1327
|
-
const _this$options = _this.options,
|
|
1328
|
-
{
|
|
1329
|
-
domain,
|
|
1330
|
-
language,
|
|
1331
|
-
debug,
|
|
1332
|
-
chatSupport
|
|
1333
|
-
} = _this$options,
|
|
1334
|
-
restOptions = objectWithoutProperties(_this$options, ["domain", "language", "debug", "chatSupport"]);
|
|
1335
|
-
|
|
1336
|
-
window.fbAsyncInit = () => {
|
|
1337
|
-
window.FB.init({
|
|
1338
|
-
appId: restOptions.appId,
|
|
1339
|
-
version: restOptions.version,
|
|
1340
|
-
cookie: restOptions.cookie,
|
|
1341
|
-
status: restOptions.status,
|
|
1342
|
-
xfbml: restOptions.xfbml,
|
|
1343
|
-
frictionlessRequests: _this.frictionlessRequests
|
|
1344
|
-
});
|
|
1345
|
-
resolve(window.FB);
|
|
1346
|
-
};
|
|
1347
|
-
|
|
1348
|
-
if (window.document.getElementById('facebook-jssdk')) {
|
|
1349
|
-
return resolve(window.FB);
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
const js = window.document.createElement('script');
|
|
1353
|
-
js.id = 'facebook-jssdk';
|
|
1354
|
-
js.async = true;
|
|
1355
|
-
js.defer = true;
|
|
1356
|
-
js.src = `https://${domain}/${language}/sdk${chatSupport ? '/xfbml.customerchat' : ''}${debug ? '/debug' : ''}.js`;
|
|
1357
|
-
window.document.body.appendChild(js);
|
|
1358
|
-
});
|
|
1359
|
-
return _this.loadingPromise;
|
|
1360
|
-
})();
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
process(method, before = [], after = []) {
|
|
1364
|
-
var _this2 = this;
|
|
1365
|
-
|
|
1366
|
-
return asyncToGenerator(function* () {
|
|
1367
|
-
const fb = yield _this2.init();
|
|
1368
|
-
return new Promise((resolve, reject) => {
|
|
1369
|
-
fb[method](...before, response => {
|
|
1370
|
-
if (!response) {
|
|
1371
|
-
if (method === 'ui') return;
|
|
1372
|
-
reject(new Error('Response is undefined'));
|
|
1373
|
-
} else if (response.error) {
|
|
1374
|
-
const {
|
|
1375
|
-
code,
|
|
1376
|
-
type,
|
|
1377
|
-
message
|
|
1378
|
-
} = response.error;
|
|
1379
|
-
const error = new Error(message);
|
|
1380
|
-
error.code = code;
|
|
1381
|
-
error.type = type;
|
|
1382
|
-
reject(error);
|
|
1383
|
-
} else {
|
|
1384
|
-
resolve(response);
|
|
1385
|
-
}
|
|
1386
|
-
}, ...after);
|
|
1387
|
-
});
|
|
1388
|
-
})();
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
ui(options) {
|
|
1392
|
-
var _this3 = this;
|
|
1393
|
-
|
|
1394
|
-
return asyncToGenerator(function* () {
|
|
1395
|
-
return _this3.process('ui', [options]);
|
|
1396
|
-
})();
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
api(path, method = Method.GET, params = {}) {
|
|
1400
|
-
var _this4 = this;
|
|
1401
|
-
|
|
1402
|
-
return asyncToGenerator(function* () {
|
|
1403
|
-
return _this4.process('api', [path, method, params]);
|
|
1404
|
-
})();
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
login(opts = null) {
|
|
1408
|
-
var _this5 = this;
|
|
1409
|
-
|
|
1410
|
-
return asyncToGenerator(function* () {
|
|
1411
|
-
return _this5.process('login', [], [opts]);
|
|
1412
|
-
})();
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
logout() {
|
|
1416
|
-
var _this6 = this;
|
|
1417
|
-
|
|
1418
|
-
return asyncToGenerator(function* () {
|
|
1419
|
-
return _this6.process('logout');
|
|
1420
|
-
})();
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
getLoginStatus() {
|
|
1424
|
-
var _this7 = this;
|
|
1425
|
-
|
|
1426
|
-
return asyncToGenerator(function* () {
|
|
1427
|
-
return _this7.process('getLoginStatus');
|
|
1428
|
-
})();
|
|
1429
|
-
}
|
|
1430
|
-
|
|
1431
|
-
getAuthResponse() {
|
|
1432
|
-
var _this8 = this;
|
|
1433
|
-
|
|
1434
|
-
return asyncToGenerator(function* () {
|
|
1435
|
-
return _this8.process('getAuthResponse');
|
|
1436
|
-
})();
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
getTokenDetail(loginResponse) {
|
|
1440
|
-
var _this9 = this;
|
|
1441
|
-
|
|
1442
|
-
return asyncToGenerator(function* () {
|
|
1443
|
-
if (loginResponse.status === LoginStatus.CONNECTED && loginResponse.authResponse) {
|
|
1444
|
-
return loginResponse.authResponse;
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
const response = yield _this9.getLoginStatus();
|
|
1448
|
-
|
|
1449
|
-
if (response.status === LoginStatus.CONNECTED && response.authResponse) {
|
|
1450
|
-
return response.authResponse;
|
|
1451
|
-
}
|
|
1452
|
-
|
|
1453
|
-
throw new Error('Token is undefined');
|
|
1454
|
-
})();
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
getProfile(params) {
|
|
1458
|
-
var _this10 = this;
|
|
1459
|
-
|
|
1460
|
-
return asyncToGenerator(function* () {
|
|
1461
|
-
return _this10.api('/me', Method.GET, params);
|
|
1462
|
-
})();
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
getTokenDetailWithProfile(params, response) {
|
|
1466
|
-
var _this11 = this;
|
|
1467
|
-
|
|
1468
|
-
return asyncToGenerator(function* () {
|
|
1469
|
-
const tokenDetail = yield _this11.getTokenDetail(response);
|
|
1470
|
-
const profile = yield _this11.getProfile(params);
|
|
1471
|
-
return {
|
|
1472
|
-
profile,
|
|
1473
|
-
tokenDetail
|
|
1474
|
-
};
|
|
1475
|
-
})();
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
getToken() {
|
|
1479
|
-
var _this12 = this;
|
|
1480
|
-
|
|
1481
|
-
return asyncToGenerator(function* () {
|
|
1482
|
-
const authResponse = yield _this12.getTokenDetail();
|
|
1483
|
-
return authResponse.accessToken;
|
|
1484
|
-
})();
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
getUserId() {
|
|
1488
|
-
var _this13 = this;
|
|
1489
|
-
|
|
1490
|
-
return asyncToGenerator(function* () {
|
|
1491
|
-
const authResponse = yield _this13.getTokenDetail();
|
|
1492
|
-
return authResponse.userID;
|
|
1493
|
-
})();
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
sendInvite(to, options) {
|
|
1497
|
-
var _this14 = this;
|
|
1498
|
-
|
|
1499
|
-
return asyncToGenerator(function* () {
|
|
1500
|
-
return _this14.ui(_objectSpread({
|
|
1501
|
-
to,
|
|
1502
|
-
method: 'apprequests'
|
|
1503
|
-
}, options));
|
|
1504
|
-
})();
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
postAction(ogNamespace, ogAction, ogObject, ogObjectUrl, noFeedStory) {
|
|
1508
|
-
var _this15 = this;
|
|
1509
|
-
|
|
1510
|
-
return asyncToGenerator(function* () {
|
|
1511
|
-
let url = `/me/${ogNamespace}:${ogAction}?${ogObject}=${encodeURIComponent(ogObjectUrl)}`;
|
|
1512
|
-
|
|
1513
|
-
if (noFeedStory === true) {
|
|
1514
|
-
url += '&no_feed_story=true';
|
|
1515
|
-
}
|
|
1516
|
-
|
|
1517
|
-
return _this15.api(url, Method.POST);
|
|
1518
|
-
})();
|
|
1519
|
-
}
|
|
1520
|
-
|
|
1521
|
-
getPermissions() {
|
|
1522
|
-
var _this16 = this;
|
|
1523
|
-
|
|
1524
|
-
return asyncToGenerator(function* () {
|
|
1525
|
-
const response = yield _this16.api('/me/permissions');
|
|
1526
|
-
return response.data;
|
|
1527
|
-
})();
|
|
1528
|
-
}
|
|
1529
|
-
|
|
1530
|
-
hasPermissions(permissions) {
|
|
1531
|
-
var _this17 = this;
|
|
1532
|
-
|
|
1533
|
-
return asyncToGenerator(function* () {
|
|
1534
|
-
const usersPermissions = yield _this17.getPermissions();
|
|
1535
|
-
const findedPermissions = permissions.filter(p => {
|
|
1536
|
-
const currentPermission = usersPermissions.find(row => {
|
|
1537
|
-
const {
|
|
1538
|
-
permission,
|
|
1539
|
-
status
|
|
1540
|
-
} = row;
|
|
1541
|
-
return status === 'granted' && permission === p;
|
|
1542
|
-
});
|
|
1543
|
-
return !!currentPermission;
|
|
1544
|
-
});
|
|
1545
|
-
return findedPermissions.length === permissions.length;
|
|
1546
|
-
})();
|
|
1547
|
-
}
|
|
1548
|
-
|
|
1549
|
-
subscribe(eventName, callback) {
|
|
1550
|
-
var _this18 = this;
|
|
1551
|
-
|
|
1552
|
-
return asyncToGenerator(function* () {
|
|
1553
|
-
const fb = yield _this18.init();
|
|
1554
|
-
fb.Event.subscribe(eventName, callback);
|
|
1555
|
-
})();
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
unsubscribe(eventName, callback) {
|
|
1559
|
-
var _this19 = this;
|
|
1560
|
-
|
|
1561
|
-
return asyncToGenerator(function* () {
|
|
1562
|
-
const fb = yield _this19.init();
|
|
1563
|
-
fb.Event.unsubscribe(eventName, callback);
|
|
1564
|
-
})();
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
parse(parentNode) {
|
|
1568
|
-
var _this20 = this;
|
|
1569
|
-
|
|
1570
|
-
return asyncToGenerator(function* () {
|
|
1571
|
-
const fb = yield _this20.init();
|
|
1572
|
-
|
|
1573
|
-
if (typeof parentNode === 'undefined') {
|
|
1574
|
-
fb.XFBML.parse();
|
|
1575
|
-
} else {
|
|
1576
|
-
fb.XFBML.parse(parentNode);
|
|
1577
|
-
}
|
|
1578
|
-
})();
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
getRequests() {
|
|
1582
|
-
var _this21 = this;
|
|
1583
|
-
|
|
1584
|
-
return asyncToGenerator(function* () {
|
|
1585
|
-
return _this21.api('/me/apprequests');
|
|
1586
|
-
})();
|
|
1587
|
-
}
|
|
1588
|
-
|
|
1589
|
-
removeRequest(requestID) {
|
|
1590
|
-
var _this22 = this;
|
|
1591
|
-
|
|
1592
|
-
return asyncToGenerator(function* () {
|
|
1593
|
-
return _this22.api(requestID, Method.DELETE);
|
|
1594
|
-
})();
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
setAutoGrow() {
|
|
1598
|
-
var _this23 = this;
|
|
1599
|
-
|
|
1600
|
-
return asyncToGenerator(function* () {
|
|
1601
|
-
const fb = yield _this23.init();
|
|
1602
|
-
fb.Canvas.setAutoGrow();
|
|
1603
|
-
})();
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
paySimple(product, quantity = 1) {
|
|
1607
|
-
var _this24 = this;
|
|
1608
|
-
|
|
1609
|
-
return asyncToGenerator(function* () {
|
|
1610
|
-
return _this24.ui({
|
|
1611
|
-
method: 'pay',
|
|
1612
|
-
action: 'purchaseitem',
|
|
1613
|
-
product,
|
|
1614
|
-
quantity
|
|
1615
|
-
});
|
|
1616
|
-
})();
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
pay(product, options) {
|
|
1620
|
-
var _this25 = this;
|
|
1621
|
-
|
|
1622
|
-
return asyncToGenerator(function* () {
|
|
1623
|
-
return _this25.ui(_objectSpread({
|
|
1624
|
-
method: 'pay',
|
|
1625
|
-
action: 'purchaseitem',
|
|
1626
|
-
product
|
|
1627
|
-
}, options));
|
|
1628
|
-
})();
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
}
|
|
1632
|
-
/*
|
|
1633
|
-
sendToFriends: function(options, callback) {
|
|
1634
|
-
if(!options) {
|
|
1635
|
-
options = {};
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1638
|
-
options.method = 'send';
|
|
1639
|
-
|
|
1640
|
-
this.afterLoad(function(err, fbApi) {
|
|
1641
|
-
if(err) {
|
|
1642
|
-
return callback(err);
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
|
-
FB.ui(options, function(response) {
|
|
1646
|
-
fbApi._callCallbackByResponse(callback, response);
|
|
1647
|
-
});
|
|
1648
|
-
});
|
|
1649
|
-
},
|
|
1650
|
-
|
|
1651
|
-
sendMessage: function(message, name, caption, description, url, imgUrl, callback) {
|
|
1652
|
-
this.afterLoad(function(err, fbApi) {
|
|
1653
|
-
if(err) {
|
|
1654
|
-
return callback(err);
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
|
-
FB.ui({
|
|
1658
|
-
method: 'stream.publish',
|
|
1659
|
-
message: message,
|
|
1660
|
-
attachment: {
|
|
1661
|
-
name: name,
|
|
1662
|
-
caption: caption,
|
|
1663
|
-
description: description,
|
|
1664
|
-
href: url,
|
|
1665
|
-
media:[{
|
|
1666
|
-
type: 'image',
|
|
1667
|
-
src: imgUrl,
|
|
1668
|
-
href: url
|
|
1669
|
-
}]
|
|
1670
|
-
},
|
|
1671
|
-
action_links: [{
|
|
1672
|
-
text: 'Code',
|
|
1673
|
-
href: url
|
|
1674
|
-
}],
|
|
1675
|
-
user_prompt_message: message
|
|
1676
|
-
},
|
|
1677
|
-
function(response) {
|
|
1678
|
-
fbApi._callCallbackByResponse(callback, response);
|
|
1679
|
-
});
|
|
1680
|
-
});
|
|
1681
|
-
},
|
|
1682
|
-
|
|
1683
|
-
sendInviteForm: function(options, callback) {
|
|
1684
|
-
if(typeof options === 'function') {
|
|
1685
|
-
callback = options;
|
|
1686
|
-
options = {};
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
this.afterLoad(function(err, fbApi) {
|
|
1690
|
-
if(err) {
|
|
1691
|
-
return callback(err);
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
options.method = options.method || 'apprequests';
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
FB.ui(options, function(response) {
|
|
1698
|
-
fbApi._callCallbackByResponse(callback, response);
|
|
1699
|
-
});
|
|
1700
|
-
});
|
|
1701
|
-
},
|
|
1702
|
-
|
|
1703
|
-
checkPageLike: function(pageID, callback) {
|
|
1704
|
-
this.afterLoad(function(err, fbApi) {
|
|
1705
|
-
if(err) {
|
|
1706
|
-
return callback(err);
|
|
1707
|
-
}
|
|
1708
|
-
|
|
1709
|
-
fbApi.getUserID(function(err, userID) {
|
|
1710
|
-
if(err) {
|
|
1711
|
-
return callback(err);
|
|
1712
|
-
}
|
|
1713
|
-
|
|
1714
|
-
var fqlQuery = `SELECT uid FROM page_fan WHERE page_id = ${pageID} and uid = ${userID}`;
|
|
1715
|
-
var query = FB.Data.query(fqlQuery);
|
|
1716
|
-
|
|
1717
|
-
query.wait(function(rows) {
|
|
1718
|
-
if (rows.length === 1 && rows[0].uid === userID) {
|
|
1719
|
-
callback(null, true, query);
|
|
1720
|
-
}
|
|
1721
|
-
else {
|
|
1722
|
-
callback(null, false, query);
|
|
1723
|
-
}
|
|
1724
|
-
});
|
|
1725
|
-
});
|
|
1726
|
-
});
|
|
1727
|
-
},
|
|
1728
|
-
|
|
1729
|
-
sendMessageToFriend: function (friendID, link, callback) {
|
|
1730
|
-
this.afterLoad(function(err, fbApi) {
|
|
1731
|
-
if(err) {
|
|
1732
|
-
return callback(err);
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
FB.ui({
|
|
1736
|
-
to: friendID,
|
|
1737
|
-
method: 'send',
|
|
1738
|
-
link: link
|
|
1739
|
-
}, function(response) {
|
|
1740
|
-
fbApi._callCallbackByResponse(callback, response);
|
|
1741
|
-
});
|
|
1742
|
-
});
|
|
1743
|
-
},
|
|
1744
|
-
|
|
1745
|
-
_prepareUsers: function(data) {
|
|
1746
|
-
var users=[];
|
|
1747
|
-
|
|
1748
|
-
for(var index in data) {
|
|
1749
|
-
var userData=data[index];
|
|
1750
|
-
|
|
1751
|
-
var user = {
|
|
1752
|
-
provider_uid: 'facebook'+'_'+userData.uid,
|
|
1753
|
-
provider: 'facebook',
|
|
1754
|
-
id: userData.uid,
|
|
1755
|
-
name: userData.name,
|
|
1756
|
-
first_name: userData.first_name,
|
|
1757
|
-
last_name: userData.last_name,
|
|
1758
|
-
status: (userData.status!==null) ? userData.status : null,
|
|
1759
|
-
image: '//graph.facebook.com/'+userData.uid+'/picture?'
|
|
1760
|
-
};
|
|
1761
|
-
|
|
1762
|
-
users.push(user);
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
return users;
|
|
1766
|
-
},
|
|
1767
|
-
|
|
1768
|
-
getUserList: function(callback) {
|
|
1769
|
-
this.afterLoad(function(err, fbApi) {
|
|
1770
|
-
if(err) {
|
|
1771
|
-
return callback(err);
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
FB.api('fql', {
|
|
1775
|
-
q: `
|
|
1776
|
-
SELECT uid, name, first_name, last_name, online_presence, status
|
|
1777
|
-
FROM user
|
|
1778
|
-
WHERE uid IN
|
|
1779
|
-
( SELECT uid2 FROM friend WHERE uid1 = me()) ORDER BY name
|
|
1780
|
-
`,
|
|
1781
|
-
}, function (response)
|
|
1782
|
-
{
|
|
1783
|
-
var users = fbApi._prepareUsers(response.data);
|
|
1784
|
-
callback(null, users, response);
|
|
1785
|
-
});
|
|
1786
|
-
});
|
|
1787
|
-
},
|
|
1788
|
-
|
|
1789
|
-
postFeed: function(options, callback) {
|
|
1790
|
-
this.afterLoad(function(err, fbApi) {
|
|
1791
|
-
if(err) {
|
|
1792
|
-
return callback(err);
|
|
1793
|
-
}
|
|
1794
|
-
|
|
1795
|
-
options.method='feed';
|
|
1796
|
-
|
|
1797
|
-
FB.ui(options, function(response) {
|
|
1798
|
-
fbApi._callCallbackByResponse(callback, response);
|
|
1799
|
-
});
|
|
1800
|
-
});
|
|
1801
|
-
},
|
|
1802
|
-
|
|
1803
|
-
//need publish_stream
|
|
1804
|
-
createAlbum: function(name, description, callback) {
|
|
1805
|
-
this.afterLoad(function(err, fbApi) {
|
|
1806
|
-
if(err) {
|
|
1807
|
-
return callback(err);
|
|
1808
|
-
}
|
|
1809
|
-
|
|
1810
|
-
FB.api('/me/albums', 'post', {
|
|
1811
|
-
name: name,
|
|
1812
|
-
description: description
|
|
1813
|
-
},function(response) {
|
|
1814
|
-
fbApi._callCallbackByResponse(callback, response);
|
|
1815
|
-
});
|
|
1816
|
-
});
|
|
1817
|
-
},
|
|
1818
|
-
|
|
1819
|
-
//need publish_stream
|
|
1820
|
-
addImageToAlbum: function(albumID, imageURL, message, callback) {
|
|
1821
|
-
this.afterLoad(function(err, fbApi) {
|
|
1822
|
-
if(err) {
|
|
1823
|
-
return callback(err);
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
|
-
FB.api('/'+albumID+'/photos', 'post', {
|
|
1827
|
-
message: message,
|
|
1828
|
-
url: imageURL
|
|
1829
|
-
}, function(response) {
|
|
1830
|
-
fbApi._callCallbackByResponse(callback, response);
|
|
1831
|
-
});
|
|
1832
|
-
});
|
|
1833
|
-
},
|
|
1834
|
-
|
|
1835
|
-
//'user_photos'
|
|
1836
|
-
getAlbums: function(callback) {
|
|
1837
|
-
this.afterLoad(function(err, fbApi) {
|
|
1838
|
-
if(err) {
|
|
1839
|
-
return callback(err);
|
|
1840
|
-
}
|
|
1841
|
-
|
|
1842
|
-
FB.api('/me/albums', function(response) {
|
|
1843
|
-
fbApi._callCallbackByResponse(callback, response);
|
|
1844
|
-
});
|
|
1845
|
-
});
|
|
1846
|
-
},
|
|
1847
|
-
|
|
1848
|
-
//'user_photos'
|
|
1849
|
-
getAlbumPhotos: function(albumID, callback) {
|
|
1850
|
-
this.afterLoad(function(err, fbApi) {
|
|
1851
|
-
if(err) {
|
|
1852
|
-
return callback(err);
|
|
1853
|
-
}
|
|
1854
|
-
|
|
1855
|
-
FB.api('/'+albumID+'/photos', function(response) {
|
|
1856
|
-
fbApi._callCallbackByResponse(callback, response);
|
|
1857
|
-
});
|
|
1858
|
-
});
|
|
1859
|
-
},
|
|
1860
|
-
|
|
1861
|
-
//'user_photos'
|
|
1862
|
-
getAlbumCoverPicture: function(albumID, callback) {
|
|
1863
|
-
this.afterLoad(function(err, fbApi) {
|
|
1864
|
-
if(err) {
|
|
1865
|
-
return callback(err);
|
|
1866
|
-
}
|
|
1867
|
-
|
|
1868
|
-
FB.api('/'+albumID+'/picture', function(response) {
|
|
1869
|
-
fbApi._callCallbackByResponse(callback, response);
|
|
1870
|
-
});
|
|
1871
|
-
});
|
|
1872
|
-
},
|
|
1873
|
-
|
|
1874
|
-
//'publish_stream'
|
|
1875
|
-
postPhoto: function(photoUrl, message, callback) {
|
|
1876
|
-
this.afterLoad(function(err, fbApi) {
|
|
1877
|
-
if(err) {
|
|
1878
|
-
return callback(err);
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
FB.api('/me/photos', 'post', {
|
|
1882
|
-
message: message,
|
|
1883
|
-
url: photoUrl
|
|
1884
|
-
},function(response) {
|
|
1885
|
-
fbApi._callCallbackByResponse(callback, response);
|
|
1886
|
-
});
|
|
1887
|
-
});
|
|
1888
|
-
},
|
|
1889
|
-
|
|
1890
|
-
getPageInfo: function(callback) {
|
|
1891
|
-
this.afterLoad(function(err, fbApi) {
|
|
1892
|
-
if(err) {
|
|
1893
|
-
return callback(err);
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
FB.Canvas.getPageInfo(function(response) {
|
|
1897
|
-
fbApi._callCallbackByResponse(callback, response);
|
|
1898
|
-
});
|
|
1899
|
-
});
|
|
1900
|
-
}
|
|
1901
|
-
*/
|
|
1902
|
-
|
|
1903
|
-
var FacebookContext = React.createContext();
|
|
1904
|
-
|
|
1905
|
-
let api = null;
|
|
1906
|
-
class Facebook$1 extends React.Component {
|
|
1907
|
-
constructor(...args) {
|
|
1908
|
-
var _this;
|
|
1909
|
-
|
|
1910
|
-
super(...args);
|
|
1911
|
-
_this = this;
|
|
1912
|
-
|
|
1913
|
-
defineProperty(this, "state", {
|
|
1914
|
-
isReady: false
|
|
1915
|
-
});
|
|
1916
|
-
|
|
1917
|
-
defineProperty(this, "handleInit",
|
|
1918
|
-
/*#__PURE__*/
|
|
1919
|
-
asyncToGenerator(function* () {
|
|
1920
|
-
// do not run if SSR
|
|
1921
|
-
if (!canUseDom) {
|
|
1922
|
-
throw new Error('You can not use Facebook without DOM');
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
|
-
const {
|
|
1926
|
-
isReady
|
|
1927
|
-
} = _this.state;
|
|
1928
|
-
|
|
1929
|
-
if (isReady) {
|
|
1930
|
-
return api;
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
if (!api) {
|
|
1934
|
-
const {
|
|
1935
|
-
domain,
|
|
1936
|
-
version,
|
|
1937
|
-
appId,
|
|
1938
|
-
cookie,
|
|
1939
|
-
status,
|
|
1940
|
-
xfbml,
|
|
1941
|
-
language,
|
|
1942
|
-
frictionlessRequests,
|
|
1943
|
-
wait,
|
|
1944
|
-
debug,
|
|
1945
|
-
chatSupport
|
|
1946
|
-
} = _this.props;
|
|
1947
|
-
api = new Facebook({
|
|
1948
|
-
domain,
|
|
1949
|
-
appId,
|
|
1950
|
-
version,
|
|
1951
|
-
cookie,
|
|
1952
|
-
status,
|
|
1953
|
-
xfbml,
|
|
1954
|
-
language,
|
|
1955
|
-
frictionlessRequests,
|
|
1956
|
-
wait,
|
|
1957
|
-
debug,
|
|
1958
|
-
chatSupport
|
|
1959
|
-
});
|
|
1960
|
-
}
|
|
1961
|
-
|
|
1962
|
-
yield api.init();
|
|
1963
|
-
|
|
1964
|
-
if (!_this.state.isReady) {
|
|
1965
|
-
_this.setState({
|
|
1966
|
-
isReady: true
|
|
1967
|
-
});
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
|
-
return api;
|
|
1971
|
-
}));
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
componentDidMount() {
|
|
1975
|
-
const {
|
|
1976
|
-
wait
|
|
1977
|
-
} = this.props;
|
|
1978
|
-
|
|
1979
|
-
if (!wait) {
|
|
1980
|
-
this.handleInit();
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
|
|
1984
|
-
render() {
|
|
1985
|
-
const {
|
|
1986
|
-
children
|
|
1987
|
-
} = this.props;
|
|
1988
|
-
const {
|
|
1989
|
-
isReady,
|
|
1990
|
-
error
|
|
1991
|
-
} = this.state;
|
|
1992
|
-
const {
|
|
1993
|
-
handleInit
|
|
1994
|
-
} = this;
|
|
1995
|
-
const value = {
|
|
1996
|
-
isReady,
|
|
1997
|
-
error,
|
|
1998
|
-
handleInit,
|
|
1999
|
-
api
|
|
2000
|
-
};
|
|
2001
|
-
return React__default.createElement(FacebookContext.Provider, {
|
|
2002
|
-
value: value
|
|
2003
|
-
}, children);
|
|
2004
|
-
}
|
|
2005
|
-
|
|
2006
|
-
}
|
|
2007
|
-
|
|
2008
|
-
defineProperty(Facebook$1, "defaultProps", {
|
|
2009
|
-
version: 'v3.1',
|
|
2010
|
-
cookie: false,
|
|
2011
|
-
status: false,
|
|
2012
|
-
xfbml: false,
|
|
2013
|
-
language: 'en_US',
|
|
2014
|
-
frictionlessRequests: false,
|
|
2015
|
-
domain: 'connect.facebook.net',
|
|
2016
|
-
children: undefined,
|
|
2017
|
-
wait: false,
|
|
2018
|
-
debug: false,
|
|
2019
|
-
chatSupport: false
|
|
2020
|
-
});
|
|
2021
|
-
|
|
2022
|
-
var _extends_1 = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
2023
|
-
function _extends() {
|
|
2024
|
-
module.exports = _extends = Object.assign || function (target) {
|
|
2025
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
2026
|
-
var source = arguments[i];
|
|
2027
|
-
|
|
2028
|
-
for (var key in source) {
|
|
2029
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2030
|
-
target[key] = source[key];
|
|
2031
|
-
}
|
|
2032
|
-
}
|
|
2033
|
-
}
|
|
2034
|
-
|
|
2035
|
-
return target;
|
|
2036
|
-
};
|
|
2037
|
-
|
|
2038
|
-
return _extends.apply(this, arguments);
|
|
2039
|
-
}
|
|
2040
|
-
|
|
2041
|
-
module.exports = _extends;
|
|
2042
|
-
});
|
|
2043
|
-
|
|
2044
|
-
class Initialize extends React.Component {
|
|
2045
|
-
componentDidMount() {
|
|
2046
|
-
this.$isMounted = true;
|
|
2047
|
-
this.prepare();
|
|
2048
|
-
}
|
|
2049
|
-
|
|
2050
|
-
componentWillUnmount() {
|
|
2051
|
-
this.$isMounted = false;
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
|
-
prepare() {
|
|
2055
|
-
var _this = this;
|
|
2056
|
-
|
|
2057
|
-
return asyncToGenerator(function* () {
|
|
2058
|
-
const {
|
|
2059
|
-
onReady,
|
|
2060
|
-
handleInit
|
|
2061
|
-
} = _this.props;
|
|
2062
|
-
const api = yield handleInit();
|
|
2063
|
-
|
|
2064
|
-
if (onReady && _this.$isMounted) {
|
|
2065
|
-
onReady(api);
|
|
2066
|
-
}
|
|
2067
|
-
})();
|
|
2068
|
-
}
|
|
2069
|
-
|
|
2070
|
-
render() {
|
|
2071
|
-
const {
|
|
2072
|
-
children,
|
|
2073
|
-
isReady,
|
|
2074
|
-
api
|
|
2075
|
-
} = this.props;
|
|
2076
|
-
const childrenProps = {
|
|
2077
|
-
isReady,
|
|
2078
|
-
api
|
|
2079
|
-
};
|
|
2080
|
-
|
|
2081
|
-
if (typeof children === 'function') {
|
|
2082
|
-
return children(childrenProps);
|
|
2083
|
-
}
|
|
2084
|
-
|
|
2085
|
-
return children;
|
|
2086
|
-
}
|
|
2087
|
-
|
|
2088
|
-
}
|
|
2089
|
-
|
|
2090
|
-
defineProperty(Initialize, "defaultProps", {
|
|
2091
|
-
onReady: undefined,
|
|
2092
|
-
api: undefined
|
|
2093
|
-
});
|
|
2094
|
-
|
|
2095
|
-
var Initialize$1 = React.forwardRef((props, ref) => React__default.createElement(FacebookContext.Consumer, null, ({
|
|
2096
|
-
handleInit,
|
|
2097
|
-
isReady,
|
|
2098
|
-
api
|
|
2099
|
-
}) => React__default.createElement(Initialize, _extends_1({}, props, {
|
|
2100
|
-
handleInit: handleInit,
|
|
2101
|
-
isReady: isReady,
|
|
2102
|
-
api: api,
|
|
2103
|
-
ref: ref
|
|
2104
|
-
}))));
|
|
2105
|
-
|
|
2106
|
-
class Parser extends React.Component {
|
|
2107
|
-
constructor(...args) {
|
|
2108
|
-
super(...args);
|
|
2109
|
-
|
|
2110
|
-
defineProperty(this, "state", {});
|
|
2111
|
-
|
|
2112
|
-
defineProperty(this, "handleReady", api => {
|
|
2113
|
-
this.setState({
|
|
2114
|
-
api
|
|
2115
|
-
}, this.handleParse);
|
|
2116
|
-
});
|
|
2117
|
-
|
|
2118
|
-
defineProperty(this, "handleContainer", container => {
|
|
2119
|
-
this.setState({
|
|
2120
|
-
container
|
|
2121
|
-
}, this.handleParse);
|
|
2122
|
-
});
|
|
2123
|
-
|
|
2124
|
-
defineProperty(this, "handleParse", () => {
|
|
2125
|
-
const {
|
|
2126
|
-
api,
|
|
2127
|
-
container
|
|
2128
|
-
} = this.state;
|
|
2129
|
-
|
|
2130
|
-
if (!api || !container) {
|
|
2131
|
-
return;
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
api.parse(container);
|
|
2135
|
-
});
|
|
2136
|
-
}
|
|
2137
|
-
|
|
2138
|
-
render() {
|
|
2139
|
-
const {
|
|
2140
|
-
className,
|
|
2141
|
-
children
|
|
2142
|
-
} = this.props;
|
|
2143
|
-
return React__default.createElement("div", {
|
|
2144
|
-
className: className,
|
|
2145
|
-
ref: this.handleContainer
|
|
2146
|
-
}, React__default.createElement(Initialize$1, {
|
|
2147
|
-
onReady: this.handleReady
|
|
2148
|
-
}, children({
|
|
2149
|
-
handleParse: this.handleParse
|
|
2150
|
-
})));
|
|
2151
|
-
}
|
|
2152
|
-
|
|
2153
|
-
}
|
|
2154
|
-
|
|
2155
|
-
defineProperty(Parser, "defaultProps", {
|
|
2156
|
-
className: undefined
|
|
2157
|
-
});
|
|
2158
|
-
|
|
2159
|
-
function getCurrentHref() {
|
|
2160
|
-
if (!canUseDom) {
|
|
2161
|
-
return 'https://www.facebook.com';
|
|
2162
|
-
}
|
|
2163
|
-
|
|
2164
|
-
return window.location.href;
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
class Like extends React.PureComponent {
|
|
2168
|
-
componentDidUpdate() {
|
|
2169
|
-
const {
|
|
2170
|
-
handleParse
|
|
2171
|
-
} = this.props;
|
|
2172
|
-
handleParse();
|
|
2173
|
-
}
|
|
2174
|
-
|
|
2175
|
-
render() {
|
|
2176
|
-
const {
|
|
2177
|
-
href = getCurrentHref(),
|
|
2178
|
-
layout,
|
|
2179
|
-
colorScheme,
|
|
2180
|
-
action,
|
|
2181
|
-
showFaces,
|
|
2182
|
-
share,
|
|
2183
|
-
children,
|
|
2184
|
-
width,
|
|
2185
|
-
size,
|
|
2186
|
-
kidDirectedSite,
|
|
2187
|
-
referral
|
|
2188
|
-
} = this.props;
|
|
2189
|
-
return React__default.createElement("div", {
|
|
2190
|
-
className: "fb-like",
|
|
2191
|
-
"data-ref": referral,
|
|
2192
|
-
"data-href": href,
|
|
2193
|
-
"data-layout": layout,
|
|
2194
|
-
"data-colorscheme": colorScheme,
|
|
2195
|
-
"data-action": action,
|
|
2196
|
-
"data-show-faces": showFaces,
|
|
2197
|
-
"data-share": share,
|
|
2198
|
-
"data-width": width,
|
|
2199
|
-
"data-size": size,
|
|
2200
|
-
"data-kid-directed-site": kidDirectedSite
|
|
2201
|
-
}, children);
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
}
|
|
2205
|
-
|
|
2206
|
-
defineProperty(Like, "defaultProps", {
|
|
2207
|
-
layout: undefined,
|
|
2208
|
-
showFaces: undefined,
|
|
2209
|
-
colorScheme: undefined,
|
|
2210
|
-
action: undefined,
|
|
2211
|
-
share: undefined,
|
|
2212
|
-
size: undefined,
|
|
2213
|
-
kidDirectedSite: undefined,
|
|
2214
|
-
children: undefined,
|
|
2215
|
-
href: undefined,
|
|
2216
|
-
referral: undefined,
|
|
2217
|
-
width: undefined
|
|
2218
|
-
});
|
|
2219
|
-
|
|
2220
|
-
React.forwardRef((props, ref) => React__default.createElement(Parser, null, ({
|
|
2221
|
-
handleParse
|
|
2222
|
-
}) => React__default.createElement(Like, _extends_1({}, props, {
|
|
2223
|
-
handleParse: handleParse,
|
|
2224
|
-
ref: ref
|
|
2225
|
-
}))));
|
|
2226
|
-
|
|
2227
|
-
function clearUndefinedProperties(obj) {
|
|
2228
|
-
if (!obj) {
|
|
2229
|
-
return obj;
|
|
2230
|
-
}
|
|
2231
|
-
|
|
2232
|
-
const newObj = {};
|
|
2233
|
-
Object.keys(obj).forEach(propertyName => {
|
|
2234
|
-
const value = obj[propertyName];
|
|
2235
|
-
|
|
2236
|
-
if (value !== undefined) {
|
|
2237
|
-
newObj[propertyName] = value;
|
|
2238
|
-
}
|
|
2239
|
-
});
|
|
2240
|
-
return newObj;
|
|
2241
|
-
}
|
|
2242
|
-
|
|
2243
|
-
class Process extends React.Component {
|
|
2244
|
-
constructor(...args) {
|
|
2245
|
-
var _this;
|
|
2246
|
-
|
|
2247
|
-
super(...args);
|
|
2248
|
-
_this = this;
|
|
2249
|
-
|
|
2250
|
-
defineProperty(this, "state", {
|
|
2251
|
-
api: undefined
|
|
2252
|
-
});
|
|
2253
|
-
|
|
2254
|
-
defineProperty(this, "handleProcess",
|
|
2255
|
-
/*#__PURE__*/
|
|
2256
|
-
function () {
|
|
2257
|
-
var _ref = asyncToGenerator(function* (fn, handleSuccess = () => {}) {
|
|
2258
|
-
_this.setState({
|
|
2259
|
-
data: undefined,
|
|
2260
|
-
error: undefined,
|
|
2261
|
-
loading: true
|
|
2262
|
-
});
|
|
2263
|
-
|
|
2264
|
-
try {
|
|
2265
|
-
const {
|
|
2266
|
-
api
|
|
2267
|
-
} = _this.state;
|
|
2268
|
-
|
|
2269
|
-
if (!api) {
|
|
2270
|
-
throw new Error('Facebook is not initialized. Wait for isReady');
|
|
2271
|
-
}
|
|
2272
|
-
|
|
2273
|
-
const data = yield fn(api);
|
|
2274
|
-
|
|
2275
|
-
_this.setState({
|
|
2276
|
-
data,
|
|
2277
|
-
loading: false
|
|
2278
|
-
}, handleSuccess);
|
|
2279
|
-
|
|
2280
|
-
return data;
|
|
2281
|
-
} catch (error) {
|
|
2282
|
-
_this.setState({
|
|
2283
|
-
error,
|
|
2284
|
-
loading: false
|
|
2285
|
-
});
|
|
2286
|
-
|
|
2287
|
-
throw error;
|
|
2288
|
-
}
|
|
2289
|
-
});
|
|
2290
|
-
|
|
2291
|
-
return function (_x) {
|
|
2292
|
-
return _ref.apply(this, arguments);
|
|
2293
|
-
};
|
|
2294
|
-
}());
|
|
2295
|
-
|
|
2296
|
-
defineProperty(this, "handleReady", api => {
|
|
2297
|
-
this.setState({
|
|
2298
|
-
api
|
|
2299
|
-
});
|
|
2300
|
-
});
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2303
|
-
render() {
|
|
2304
|
-
const {
|
|
2305
|
-
children
|
|
2306
|
-
} = this.props;
|
|
2307
|
-
const {
|
|
2308
|
-
api,
|
|
2309
|
-
loading,
|
|
2310
|
-
data,
|
|
2311
|
-
error
|
|
2312
|
-
} = this.state;
|
|
2313
|
-
return React__default.createElement(Initialize$1, {
|
|
2314
|
-
onReady: this.handleReady
|
|
2315
|
-
}, children({
|
|
2316
|
-
loading: !api || loading,
|
|
2317
|
-
handleProcess: this.handleProcess,
|
|
2318
|
-
data,
|
|
2319
|
-
error
|
|
2320
|
-
}));
|
|
2321
|
-
}
|
|
2322
|
-
|
|
2323
|
-
}
|
|
2324
|
-
|
|
2325
|
-
class Send extends React.Component {
|
|
2326
|
-
constructor(...args) {
|
|
2327
|
-
var _this;
|
|
2328
|
-
|
|
2329
|
-
super(...args);
|
|
2330
|
-
_this = this;
|
|
2331
|
-
|
|
2332
|
-
defineProperty(this, "handleClick",
|
|
2333
|
-
/*#__PURE__*/
|
|
2334
|
-
function () {
|
|
2335
|
-
var _ref = asyncToGenerator(function* (evn) {
|
|
2336
|
-
evn.preventDefault();
|
|
2337
|
-
const {
|
|
2338
|
-
handleProcess
|
|
2339
|
-
} = _this.props;
|
|
2340
|
-
return handleProcess(
|
|
2341
|
-
/*#__PURE__*/
|
|
2342
|
-
function () {
|
|
2343
|
-
var _ref2 = asyncToGenerator(function* (api) {
|
|
2344
|
-
const {
|
|
2345
|
-
link = getCurrentHref(),
|
|
2346
|
-
display,
|
|
2347
|
-
appId = api.getAppId(),
|
|
2348
|
-
to,
|
|
2349
|
-
redirectURI
|
|
2350
|
-
} = _this.props;
|
|
2351
|
-
return api.ui(clearUndefinedProperties({
|
|
2352
|
-
method: 'send',
|
|
2353
|
-
link,
|
|
2354
|
-
display,
|
|
2355
|
-
app_id: appId,
|
|
2356
|
-
to,
|
|
2357
|
-
redirect_uri: redirectURI
|
|
2358
|
-
}));
|
|
2359
|
-
});
|
|
2360
|
-
|
|
2361
|
-
return function (_x2) {
|
|
2362
|
-
return _ref2.apply(this, arguments);
|
|
2363
|
-
};
|
|
2364
|
-
}());
|
|
2365
|
-
});
|
|
2366
|
-
|
|
2367
|
-
return function (_x) {
|
|
2368
|
-
return _ref.apply(this, arguments);
|
|
2369
|
-
};
|
|
2370
|
-
}());
|
|
2371
|
-
}
|
|
2372
|
-
|
|
2373
|
-
render() {
|
|
2374
|
-
const {
|
|
2375
|
-
children,
|
|
2376
|
-
loading
|
|
2377
|
-
} = this.props;
|
|
2378
|
-
return children({
|
|
2379
|
-
loading,
|
|
2380
|
-
handleClick: this.handleClick
|
|
2381
|
-
});
|
|
2382
|
-
}
|
|
2383
|
-
|
|
2384
|
-
}
|
|
2385
|
-
|
|
2386
|
-
defineProperty(Send, "defaultProps", {
|
|
2387
|
-
to: undefined,
|
|
2388
|
-
display: undefined,
|
|
2389
|
-
appId: undefined,
|
|
2390
|
-
redirectURI: undefined
|
|
2391
|
-
});
|
|
2392
|
-
|
|
2393
|
-
React.forwardRef((props, ref) => React__default.createElement(Process, null, ({
|
|
2394
|
-
loading,
|
|
2395
|
-
handleProcess
|
|
2396
|
-
}) => React__default.createElement(Send, _extends_1({}, props, {
|
|
2397
|
-
loading: loading,
|
|
2398
|
-
handleProcess: handleProcess,
|
|
2399
|
-
ref: ref
|
|
2400
|
-
}))));
|
|
2401
|
-
|
|
2402
|
-
class Share extends React.Component {
|
|
2403
|
-
constructor(...args) {
|
|
2404
|
-
var _this;
|
|
2405
|
-
|
|
2406
|
-
super(...args);
|
|
2407
|
-
_this = this;
|
|
2408
|
-
|
|
2409
|
-
defineProperty(this, "handleClick",
|
|
2410
|
-
/*#__PURE__*/
|
|
2411
|
-
function () {
|
|
2412
|
-
var _ref = asyncToGenerator(function* (evn) {
|
|
2413
|
-
evn.preventDefault();
|
|
2414
|
-
const {
|
|
2415
|
-
handleProcess
|
|
2416
|
-
} = _this.props;
|
|
2417
|
-
return handleProcess(
|
|
2418
|
-
/*#__PURE__*/
|
|
2419
|
-
function () {
|
|
2420
|
-
var _ref2 = asyncToGenerator(function* (api) {
|
|
2421
|
-
const {
|
|
2422
|
-
href = getCurrentHref(),
|
|
2423
|
-
display,
|
|
2424
|
-
appId = api.getAppId(),
|
|
2425
|
-
hashtag,
|
|
2426
|
-
redirectURI,
|
|
2427
|
-
quote,
|
|
2428
|
-
mobileIframe
|
|
2429
|
-
} = _this.props;
|
|
2430
|
-
return api.ui(clearUndefinedProperties({
|
|
2431
|
-
method: 'share',
|
|
2432
|
-
href,
|
|
2433
|
-
display,
|
|
2434
|
-
app_id: appId,
|
|
2435
|
-
hashtag,
|
|
2436
|
-
redirect_uri: redirectURI,
|
|
2437
|
-
quote,
|
|
2438
|
-
mobile_iframe: mobileIframe
|
|
2439
|
-
}));
|
|
2440
|
-
});
|
|
2441
|
-
|
|
2442
|
-
return function (_x2) {
|
|
2443
|
-
return _ref2.apply(this, arguments);
|
|
2444
|
-
};
|
|
2445
|
-
}());
|
|
2446
|
-
});
|
|
2447
|
-
|
|
2448
|
-
return function (_x) {
|
|
2449
|
-
return _ref.apply(this, arguments);
|
|
2450
|
-
};
|
|
2451
|
-
}());
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
|
-
render() {
|
|
2455
|
-
const {
|
|
2456
|
-
children,
|
|
2457
|
-
loading,
|
|
2458
|
-
error,
|
|
2459
|
-
data
|
|
2460
|
-
} = this.props;
|
|
2461
|
-
return children({
|
|
2462
|
-
loading,
|
|
2463
|
-
handleClick: this.handleClick,
|
|
2464
|
-
error,
|
|
2465
|
-
data
|
|
2466
|
-
});
|
|
2467
|
-
}
|
|
2468
|
-
|
|
2469
|
-
}
|
|
2470
|
-
|
|
2471
|
-
defineProperty(Share, "defaultProps", {
|
|
2472
|
-
href: undefined,
|
|
2473
|
-
hashtag: undefined,
|
|
2474
|
-
quote: undefined,
|
|
2475
|
-
mobileIframe: undefined,
|
|
2476
|
-
display: undefined,
|
|
2477
|
-
appId: undefined,
|
|
2478
|
-
redirectURI: undefined
|
|
2479
|
-
});
|
|
2480
|
-
|
|
2481
|
-
var Share$1 = React.forwardRef((props, ref) => React__default.createElement(Process, null, ({
|
|
2482
|
-
loading,
|
|
2483
|
-
handleProcess,
|
|
2484
|
-
data,
|
|
2485
|
-
error
|
|
2486
|
-
}) => React__default.createElement(Share, _extends_1({}, props, {
|
|
2487
|
-
loading: loading,
|
|
2488
|
-
handleProcess: handleProcess,
|
|
2489
|
-
data: data,
|
|
2490
|
-
error: error,
|
|
2491
|
-
ref: ref
|
|
2492
|
-
}))));
|
|
2493
|
-
|
|
2494
|
-
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
2495
|
-
|
|
2496
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
2497
|
-
function ShareButton(props) {
|
|
2498
|
-
const {
|
|
2499
|
-
className,
|
|
2500
|
-
children
|
|
2501
|
-
} = props,
|
|
2502
|
-
rest = objectWithoutProperties(props, ["className", "children"]);
|
|
2503
|
-
|
|
2504
|
-
return React__default.createElement(Share$1, rest, ({
|
|
2505
|
-
loading,
|
|
2506
|
-
handleClick
|
|
2507
|
-
}) => React__default.createElement("button", {
|
|
2508
|
-
type: "button",
|
|
2509
|
-
disabled: loading,
|
|
2510
|
-
className: className,
|
|
2511
|
-
onClick: handleClick
|
|
2512
|
-
}, children));
|
|
2513
|
-
}
|
|
2514
|
-
ShareButton.defaultProps = _objectSpread$1({}, Share$1.defaultProps, {
|
|
2515
|
-
className: undefined
|
|
2516
|
-
});
|
|
2517
|
-
|
|
2518
|
-
class Page extends React.PureComponent {
|
|
2519
|
-
componentDidUpdate() {
|
|
2520
|
-
const {
|
|
2521
|
-
handleParse
|
|
2522
|
-
} = this.props;
|
|
2523
|
-
handleParse();
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
render() {
|
|
2527
|
-
const {
|
|
2528
|
-
style,
|
|
2529
|
-
href = getCurrentHref(),
|
|
2530
|
-
tabs,
|
|
2531
|
-
hideCover,
|
|
2532
|
-
width,
|
|
2533
|
-
height,
|
|
2534
|
-
showFacepile,
|
|
2535
|
-
hideCTA,
|
|
2536
|
-
smallHeader,
|
|
2537
|
-
adaptContainerWidth,
|
|
2538
|
-
children
|
|
2539
|
-
} = this.props;
|
|
2540
|
-
return React__default.createElement("div", {
|
|
2541
|
-
className: "fb-page",
|
|
2542
|
-
style: style,
|
|
2543
|
-
"data-tabs": tabs,
|
|
2544
|
-
"data-hide-cover": hideCover,
|
|
2545
|
-
"data-show-facepile": showFacepile,
|
|
2546
|
-
"data-hide-cta": hideCTA,
|
|
2547
|
-
"data-href": href,
|
|
2548
|
-
"data-small-header": smallHeader,
|
|
2549
|
-
"data-adapt-container-width": adaptContainerWidth,
|
|
2550
|
-
"data-height": height,
|
|
2551
|
-
"data-width": width
|
|
2552
|
-
}, children);
|
|
2553
|
-
}
|
|
2554
|
-
|
|
2555
|
-
}
|
|
2556
|
-
|
|
2557
|
-
defineProperty(Page, "defaultProps", {
|
|
2558
|
-
width: undefined,
|
|
2559
|
-
height: undefined,
|
|
2560
|
-
tabs: undefined,
|
|
2561
|
-
hideCover: undefined,
|
|
2562
|
-
showFacepile: undefined,
|
|
2563
|
-
hideCTA: undefined,
|
|
2564
|
-
smallHeader: undefined,
|
|
2565
|
-
adaptContainerWidth: undefined,
|
|
2566
|
-
children: undefined,
|
|
2567
|
-
style: undefined,
|
|
2568
|
-
href: undefined
|
|
2569
|
-
});
|
|
2570
|
-
|
|
2571
|
-
var Page$1 = React.forwardRef((props, ref) => React__default.createElement(Parser, null, ({
|
|
2572
|
-
handleParse
|
|
2573
|
-
}) => React__default.createElement(Page, _extends_1({}, props, {
|
|
2574
|
-
handleParse: handleParse,
|
|
2575
|
-
ref: ref
|
|
2576
|
-
}))));
|
|
2577
|
-
|
|
2578
|
-
// 3.0 fields without app review https://developers.facebook.com/docs/facebook-login/permissions/?locale=en_US#reference-default
|
|
2579
|
-
var Fields = ['id', 'first_name', 'last_name', 'middle_name', 'name', 'name_format', 'picture', 'short_name', 'email'];
|
|
2580
|
-
|
|
2581
|
-
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
2582
|
-
|
|
2583
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
2584
|
-
|
|
2585
|
-
class Login extends React.Component {
|
|
2586
|
-
constructor(...args) {
|
|
2587
|
-
var _this;
|
|
2588
|
-
|
|
2589
|
-
super(...args);
|
|
2590
|
-
_this = this;
|
|
2591
|
-
|
|
2592
|
-
defineProperty(this, "handleClick",
|
|
2593
|
-
/*#__PURE__*/
|
|
2594
|
-
function () {
|
|
2595
|
-
var _ref = asyncToGenerator(function* (evn) {
|
|
2596
|
-
evn.preventDefault();
|
|
2597
|
-
const {
|
|
2598
|
-
handleProcess,
|
|
2599
|
-
onCompleted,
|
|
2600
|
-
onError,
|
|
2601
|
-
onSuccess
|
|
2602
|
-
} = _this.props;
|
|
2603
|
-
|
|
2604
|
-
try {
|
|
2605
|
-
yield handleProcess(
|
|
2606
|
-
/*#__PURE__*/
|
|
2607
|
-
function () {
|
|
2608
|
-
var _ref2 = asyncToGenerator(function* (api) {
|
|
2609
|
-
const {
|
|
2610
|
-
scope,
|
|
2611
|
-
fields,
|
|
2612
|
-
returnScopes,
|
|
2613
|
-
rerequest,
|
|
2614
|
-
reauthorize,
|
|
2615
|
-
eventKey
|
|
2616
|
-
} = _this.props;
|
|
2617
|
-
const loginQpts = {
|
|
2618
|
-
scope
|
|
2619
|
-
};
|
|
2620
|
-
const authType = [];
|
|
2621
|
-
|
|
2622
|
-
if (returnScopes) {
|
|
2623
|
-
loginQpts.return_scopes = true;
|
|
2624
|
-
}
|
|
2625
|
-
|
|
2626
|
-
if (rerequest) {
|
|
2627
|
-
authType.push('rerequest');
|
|
2628
|
-
}
|
|
2629
|
-
|
|
2630
|
-
if (reauthorize) {
|
|
2631
|
-
authType.push('reauthenticate');
|
|
2632
|
-
}
|
|
2633
|
-
|
|
2634
|
-
if (authType.length) {
|
|
2635
|
-
loginQpts.auth_type = authType.join(',');
|
|
2636
|
-
}
|
|
2637
|
-
|
|
2638
|
-
const loginResponse = yield api.login(loginQpts);
|
|
2639
|
-
|
|
2640
|
-
if (loginResponse.status !== 'connected') {
|
|
2641
|
-
throw new Error('Unauthorized user');
|
|
2642
|
-
}
|
|
2643
|
-
|
|
2644
|
-
const data = yield api.getTokenDetailWithProfile({
|
|
2645
|
-
fields
|
|
2646
|
-
}, loginResponse);
|
|
2647
|
-
|
|
2648
|
-
if (onCompleted) {
|
|
2649
|
-
yield onCompleted(_objectSpread$2({}, data, {
|
|
2650
|
-
eventKey
|
|
2651
|
-
}));
|
|
2652
|
-
}
|
|
2653
|
-
|
|
2654
|
-
return data;
|
|
2655
|
-
});
|
|
2656
|
-
|
|
2657
|
-
return function (_x2) {
|
|
2658
|
-
return _ref2.apply(this, arguments);
|
|
2659
|
-
};
|
|
2660
|
-
}(), onSuccess);
|
|
2661
|
-
} catch (error) {
|
|
2662
|
-
if (onError) {
|
|
2663
|
-
onError(error);
|
|
2664
|
-
}
|
|
2665
|
-
}
|
|
2666
|
-
});
|
|
2667
|
-
|
|
2668
|
-
return function (_x) {
|
|
2669
|
-
return _ref.apply(this, arguments);
|
|
2670
|
-
};
|
|
2671
|
-
}());
|
|
2672
|
-
}
|
|
2673
|
-
|
|
2674
|
-
render() {
|
|
2675
|
-
const {
|
|
2676
|
-
children,
|
|
2677
|
-
loading,
|
|
2678
|
-
error,
|
|
2679
|
-
data
|
|
2680
|
-
} = this.props;
|
|
2681
|
-
return children({
|
|
2682
|
-
loading,
|
|
2683
|
-
handleClick: this.handleClick,
|
|
2684
|
-
error,
|
|
2685
|
-
data
|
|
2686
|
-
});
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
|
-
}
|
|
2690
|
-
|
|
2691
|
-
defineProperty(Login, "defaultProps", {
|
|
2692
|
-
scope: '',
|
|
2693
|
-
fields: Fields,
|
|
2694
|
-
returnScopes: false,
|
|
2695
|
-
rerequest: false,
|
|
2696
|
-
reauthorize: false,
|
|
2697
|
-
onCompleted: undefined,
|
|
2698
|
-
onError: undefined,
|
|
2699
|
-
eventKey: undefined
|
|
2700
|
-
});
|
|
2701
|
-
|
|
2702
|
-
var Login$1 = React.forwardRef((props, ref) => React__default.createElement(Process, null, ({
|
|
2703
|
-
loading,
|
|
2704
|
-
handleProcess,
|
|
2705
|
-
data,
|
|
2706
|
-
error
|
|
2707
|
-
}) => React__default.createElement(Login, _extends_1({}, props, {
|
|
2708
|
-
loading: loading,
|
|
2709
|
-
handleProcess: handleProcess,
|
|
2710
|
-
data: data,
|
|
2711
|
-
error: error,
|
|
2712
|
-
ref: ref
|
|
2713
|
-
}))));
|
|
2714
|
-
|
|
2715
|
-
var spin = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
2716
|
-
(function (root, factory) {
|
|
2717
|
-
|
|
2718
|
-
/* CommonJS */
|
|
2719
|
-
if ( module.exports) module.exports = factory();
|
|
2720
|
-
|
|
2721
|
-
/* AMD module */
|
|
2722
|
-
else root.Spinner = factory();
|
|
2723
|
-
}(_commonjsHelpers.commonjsGlobal, function () {
|
|
2724
|
-
|
|
2725
|
-
var prefixes = ['webkit', 'Moz', 'ms', 'O'] /* Vendor prefixes */
|
|
2726
|
-
, animations = {} /* Animation rules keyed by their name */
|
|
2727
|
-
, useCssAnimations /* Whether to use CSS animations or setTimeout */
|
|
2728
|
-
, sheet; /* A stylesheet to hold the @keyframe or VML rules. */
|
|
2729
|
-
|
|
2730
|
-
/**
|
|
2731
|
-
* Utility function to create elements. If no tag name is given,
|
|
2732
|
-
* a DIV is created. Optionally properties can be passed.
|
|
2733
|
-
*/
|
|
2734
|
-
function createEl (tag, prop) {
|
|
2735
|
-
var el = document.createElement(tag || 'div')
|
|
2736
|
-
, n;
|
|
2737
|
-
|
|
2738
|
-
for (n in prop) el[n] = prop[n];
|
|
2739
|
-
return el
|
|
2740
|
-
}
|
|
2741
|
-
|
|
2742
|
-
/**
|
|
2743
|
-
* Appends children and returns the parent.
|
|
2744
|
-
*/
|
|
2745
|
-
function ins (parent /* child1, child2, ...*/) {
|
|
2746
|
-
for (var i = 1, n = arguments.length; i < n; i++) {
|
|
2747
|
-
parent.appendChild(arguments[i]);
|
|
2748
|
-
}
|
|
2749
|
-
|
|
2750
|
-
return parent
|
|
2751
|
-
}
|
|
2752
|
-
|
|
2753
|
-
/**
|
|
2754
|
-
* Creates an opacity keyframe animation rule and returns its name.
|
|
2755
|
-
* Since most mobile Webkits have timing issues with animation-delay,
|
|
2756
|
-
* we create separate rules for each line/segment.
|
|
2757
|
-
*/
|
|
2758
|
-
function addAnimation (alpha, trail, i, lines) {
|
|
2759
|
-
var name = ['opacity', trail, ~~(alpha * 100), i, lines].join('-')
|
|
2760
|
-
, start = 0.01 + i/lines * 100
|
|
2761
|
-
, z = Math.max(1 - (1-alpha) / trail * (100-start), alpha)
|
|
2762
|
-
, prefix = useCssAnimations.substring(0, useCssAnimations.indexOf('Animation')).toLowerCase()
|
|
2763
|
-
, pre = prefix && '-' + prefix + '-' || '';
|
|
2764
|
-
|
|
2765
|
-
if (!animations[name]) {
|
|
2766
|
-
sheet.insertRule(
|
|
2767
|
-
'@' + pre + 'keyframes ' + name + '{' +
|
|
2768
|
-
'0%{opacity:' + z + '}' +
|
|
2769
|
-
start + '%{opacity:' + alpha + '}' +
|
|
2770
|
-
(start+0.01) + '%{opacity:1}' +
|
|
2771
|
-
(start+trail) % 100 + '%{opacity:' + alpha + '}' +
|
|
2772
|
-
'100%{opacity:' + z + '}' +
|
|
2773
|
-
'}', sheet.cssRules.length);
|
|
2774
|
-
|
|
2775
|
-
animations[name] = 1;
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
|
-
return name
|
|
2779
|
-
}
|
|
2780
|
-
|
|
2781
|
-
/**
|
|
2782
|
-
* Tries various vendor prefixes and returns the first supported property.
|
|
2783
|
-
*/
|
|
2784
|
-
function vendor (el, prop) {
|
|
2785
|
-
var s = el.style
|
|
2786
|
-
, pp
|
|
2787
|
-
, i;
|
|
2788
|
-
|
|
2789
|
-
prop = prop.charAt(0).toUpperCase() + prop.slice(1);
|
|
2790
|
-
if (s[prop] !== undefined) return prop
|
|
2791
|
-
for (i = 0; i < prefixes.length; i++) {
|
|
2792
|
-
pp = prefixes[i]+prop;
|
|
2793
|
-
if (s[pp] !== undefined) return pp
|
|
2794
|
-
}
|
|
2795
|
-
}
|
|
2796
|
-
|
|
2797
|
-
/**
|
|
2798
|
-
* Sets multiple style properties at once.
|
|
2799
|
-
*/
|
|
2800
|
-
function css (el, prop) {
|
|
2801
|
-
for (var n in prop) {
|
|
2802
|
-
el.style[vendor(el, n) || n] = prop[n];
|
|
2803
|
-
}
|
|
2804
|
-
|
|
2805
|
-
return el
|
|
2806
|
-
}
|
|
2807
|
-
|
|
2808
|
-
/**
|
|
2809
|
-
* Fills in default values.
|
|
2810
|
-
*/
|
|
2811
|
-
function merge (obj) {
|
|
2812
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
2813
|
-
var def = arguments[i];
|
|
2814
|
-
for (var n in def) {
|
|
2815
|
-
if (obj[n] === undefined) obj[n] = def[n];
|
|
2816
|
-
}
|
|
2817
|
-
}
|
|
2818
|
-
return obj
|
|
2819
|
-
}
|
|
2820
|
-
|
|
2821
|
-
/**
|
|
2822
|
-
* Returns the line color from the given string or array.
|
|
2823
|
-
*/
|
|
2824
|
-
function getColor (color, idx) {
|
|
2825
|
-
return typeof color == 'string' ? color : color[idx % color.length]
|
|
2826
|
-
}
|
|
2827
|
-
|
|
2828
|
-
// Built-in defaults
|
|
2829
|
-
|
|
2830
|
-
var defaults = {
|
|
2831
|
-
lines: 12 // The number of lines to draw
|
|
2832
|
-
, length: 7 // The length of each line
|
|
2833
|
-
, width: 5 // The line thickness
|
|
2834
|
-
, radius: 10 // The radius of the inner circle
|
|
2835
|
-
, scale: 1.0 // Scales overall size of the spinner
|
|
2836
|
-
, corners: 1 // Roundness (0..1)
|
|
2837
|
-
, color: '#000' // #rgb or #rrggbb
|
|
2838
|
-
, opacity: 1/4 // Opacity of the lines
|
|
2839
|
-
, rotate: 0 // Rotation offset
|
|
2840
|
-
, direction: 1 // 1: clockwise, -1: counterclockwise
|
|
2841
|
-
, speed: 1 // Rounds per second
|
|
2842
|
-
, trail: 100 // Afterglow percentage
|
|
2843
|
-
, fps: 20 // Frames per second when using setTimeout()
|
|
2844
|
-
, zIndex: 2e9 // Use a high z-index by default
|
|
2845
|
-
, className: 'spinner' // CSS class to assign to the element
|
|
2846
|
-
, top: '50%' // center vertically
|
|
2847
|
-
, left: '50%' // center horizontally
|
|
2848
|
-
, shadow: false // Whether to render a shadow
|
|
2849
|
-
, hwaccel: false // Whether to use hardware acceleration (might be buggy)
|
|
2850
|
-
, position: 'absolute' // Element positioning
|
|
2851
|
-
};
|
|
2852
|
-
|
|
2853
|
-
/** The constructor */
|
|
2854
|
-
function Spinner (o) {
|
|
2855
|
-
this.opts = merge(o || {}, Spinner.defaults, defaults);
|
|
2856
|
-
}
|
|
2857
|
-
|
|
2858
|
-
// Global defaults that override the built-ins:
|
|
2859
|
-
Spinner.defaults = {};
|
|
2860
|
-
|
|
2861
|
-
merge(Spinner.prototype, {
|
|
2862
|
-
/**
|
|
2863
|
-
* Adds the spinner to the given target element. If this instance is already
|
|
2864
|
-
* spinning, it is automatically removed from its previous target b calling
|
|
2865
|
-
* stop() internally.
|
|
2866
|
-
*/
|
|
2867
|
-
spin: function (target) {
|
|
2868
|
-
this.stop();
|
|
2869
|
-
|
|
2870
|
-
var self = this
|
|
2871
|
-
, o = self.opts
|
|
2872
|
-
, el = self.el = createEl(null, {className: o.className});
|
|
2873
|
-
|
|
2874
|
-
css(el, {
|
|
2875
|
-
position: o.position
|
|
2876
|
-
, width: 0
|
|
2877
|
-
, zIndex: o.zIndex
|
|
2878
|
-
, left: o.left
|
|
2879
|
-
, top: o.top
|
|
2880
|
-
});
|
|
2881
|
-
|
|
2882
|
-
if (target) {
|
|
2883
|
-
target.insertBefore(el, target.firstChild || null);
|
|
2884
|
-
}
|
|
2885
|
-
|
|
2886
|
-
el.setAttribute('role', 'progressbar');
|
|
2887
|
-
self.lines(el, self.opts);
|
|
2888
|
-
|
|
2889
|
-
if (!useCssAnimations) {
|
|
2890
|
-
// No CSS animation support, use setTimeout() instead
|
|
2891
|
-
var i = 0
|
|
2892
|
-
, start = (o.lines - 1) * (1 - o.direction) / 2
|
|
2893
|
-
, alpha
|
|
2894
|
-
, fps = o.fps
|
|
2895
|
-
, f = fps / o.speed
|
|
2896
|
-
, ostep = (1 - o.opacity) / (f * o.trail / 100)
|
|
2897
|
-
, astep = f / o.lines
|
|
2898
|
-
|
|
2899
|
-
;(function anim () {
|
|
2900
|
-
i++;
|
|
2901
|
-
for (var j = 0; j < o.lines; j++) {
|
|
2902
|
-
alpha = Math.max(1 - (i + (o.lines - j) * astep) % f * ostep, o.opacity);
|
|
2903
|
-
|
|
2904
|
-
self.opacity(el, j * o.direction + start, alpha, o);
|
|
2905
|
-
}
|
|
2906
|
-
self.timeout = self.el && setTimeout(anim, ~~(1000 / fps));
|
|
2907
|
-
})();
|
|
2908
|
-
}
|
|
2909
|
-
return self
|
|
2910
|
-
}
|
|
2911
|
-
|
|
2912
|
-
/**
|
|
2913
|
-
* Stops and removes the Spinner.
|
|
2914
|
-
*/
|
|
2915
|
-
, stop: function () {
|
|
2916
|
-
var el = this.el;
|
|
2917
|
-
if (el) {
|
|
2918
|
-
clearTimeout(this.timeout);
|
|
2919
|
-
if (el.parentNode) el.parentNode.removeChild(el);
|
|
2920
|
-
this.el = undefined;
|
|
2921
|
-
}
|
|
2922
|
-
return this
|
|
2923
|
-
}
|
|
2924
|
-
|
|
2925
|
-
/**
|
|
2926
|
-
* Internal method that draws the individual lines. Will be overwritten
|
|
2927
|
-
* in VML fallback mode below.
|
|
2928
|
-
*/
|
|
2929
|
-
, lines: function (el, o) {
|
|
2930
|
-
var i = 0
|
|
2931
|
-
, start = (o.lines - 1) * (1 - o.direction) / 2
|
|
2932
|
-
, seg;
|
|
2933
|
-
|
|
2934
|
-
function fill (color, shadow) {
|
|
2935
|
-
return css(createEl(), {
|
|
2936
|
-
position: 'absolute'
|
|
2937
|
-
, width: o.scale * (o.length + o.width) + 'px'
|
|
2938
|
-
, height: o.scale * o.width + 'px'
|
|
2939
|
-
, background: color
|
|
2940
|
-
, boxShadow: shadow
|
|
2941
|
-
, transformOrigin: 'left'
|
|
2942
|
-
, transform: 'rotate(' + ~~(360/o.lines*i + o.rotate) + 'deg) translate(' + o.scale*o.radius + 'px' + ',0)'
|
|
2943
|
-
, borderRadius: (o.corners * o.scale * o.width >> 1) + 'px'
|
|
2944
|
-
})
|
|
2945
|
-
}
|
|
2946
|
-
|
|
2947
|
-
for (; i < o.lines; i++) {
|
|
2948
|
-
seg = css(createEl(), {
|
|
2949
|
-
position: 'absolute'
|
|
2950
|
-
, top: 1 + ~(o.scale * o.width / 2) + 'px'
|
|
2951
|
-
, transform: o.hwaccel ? 'translate3d(0,0,0)' : ''
|
|
2952
|
-
, opacity: o.opacity
|
|
2953
|
-
, animation: useCssAnimations && addAnimation(o.opacity, o.trail, start + i * o.direction, o.lines) + ' ' + 1 / o.speed + 's linear infinite'
|
|
2954
|
-
});
|
|
2955
|
-
|
|
2956
|
-
if (o.shadow) ins(seg, css(fill('#000', '0 0 4px #000'), {top: '2px'}));
|
|
2957
|
-
ins(el, ins(seg, fill(getColor(o.color, i), '0 0 1px rgba(0,0,0,.1)')));
|
|
2958
|
-
}
|
|
2959
|
-
return el
|
|
2960
|
-
}
|
|
2961
|
-
|
|
2962
|
-
/**
|
|
2963
|
-
* Internal method that adjusts the opacity of a single line.
|
|
2964
|
-
* Will be overwritten in VML fallback mode below.
|
|
2965
|
-
*/
|
|
2966
|
-
, opacity: function (el, i, val) {
|
|
2967
|
-
if (i < el.childNodes.length) el.childNodes[i].style.opacity = val;
|
|
2968
|
-
}
|
|
2969
|
-
|
|
2970
|
-
});
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
function initVML () {
|
|
2974
|
-
|
|
2975
|
-
/* Utility function to create a VML tag */
|
|
2976
|
-
function vml (tag, attr) {
|
|
2977
|
-
return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr)
|
|
2978
|
-
}
|
|
2979
|
-
|
|
2980
|
-
// No CSS transforms but VML support, add a CSS rule for VML elements:
|
|
2981
|
-
sheet.addRule('.spin-vml', 'behavior:url(#default#VML)');
|
|
2982
|
-
|
|
2983
|
-
Spinner.prototype.lines = function (el, o) {
|
|
2984
|
-
var r = o.scale * (o.length + o.width)
|
|
2985
|
-
, s = o.scale * 2 * r;
|
|
2986
|
-
|
|
2987
|
-
function grp () {
|
|
2988
|
-
return css(
|
|
2989
|
-
vml('group', {
|
|
2990
|
-
coordsize: s + ' ' + s
|
|
2991
|
-
, coordorigin: -r + ' ' + -r
|
|
2992
|
-
})
|
|
2993
|
-
, { width: s, height: s }
|
|
2994
|
-
)
|
|
2995
|
-
}
|
|
2996
|
-
|
|
2997
|
-
var margin = -(o.width + o.length) * o.scale * 2 + 'px'
|
|
2998
|
-
, g = css(grp(), {position: 'absolute', top: margin, left: margin})
|
|
2999
|
-
, i;
|
|
3000
|
-
|
|
3001
|
-
function seg (i, dx, filter) {
|
|
3002
|
-
ins(
|
|
3003
|
-
g
|
|
3004
|
-
, ins(
|
|
3005
|
-
css(grp(), {rotation: 360 / o.lines * i + 'deg', left: ~~dx})
|
|
3006
|
-
, ins(
|
|
3007
|
-
css(
|
|
3008
|
-
vml('roundrect', {arcsize: o.corners})
|
|
3009
|
-
, { width: r
|
|
3010
|
-
, height: o.scale * o.width
|
|
3011
|
-
, left: o.scale * o.radius
|
|
3012
|
-
, top: -o.scale * o.width >> 1
|
|
3013
|
-
, filter: filter
|
|
3014
|
-
}
|
|
3015
|
-
)
|
|
3016
|
-
, vml('fill', {color: getColor(o.color, i), opacity: o.opacity})
|
|
3017
|
-
, vml('stroke', {opacity: 0}) // transparent stroke to fix color bleeding upon opacity change
|
|
3018
|
-
)
|
|
3019
|
-
)
|
|
3020
|
-
);
|
|
3021
|
-
}
|
|
3022
|
-
|
|
3023
|
-
if (o.shadow)
|
|
3024
|
-
for (i = 1; i <= o.lines; i++) {
|
|
3025
|
-
seg(i, -2, 'progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)');
|
|
3026
|
-
}
|
|
3027
|
-
|
|
3028
|
-
for (i = 1; i <= o.lines; i++) seg(i);
|
|
3029
|
-
return ins(el, g)
|
|
3030
|
-
};
|
|
3031
|
-
|
|
3032
|
-
Spinner.prototype.opacity = function (el, i, val, o) {
|
|
3033
|
-
var c = el.firstChild;
|
|
3034
|
-
o = o.shadow && o.lines || 0;
|
|
3035
|
-
if (c && i + o < c.childNodes.length) {
|
|
3036
|
-
c = c.childNodes[i + o]; c = c && c.firstChild; c = c && c.firstChild;
|
|
3037
|
-
if (c) c.opacity = val;
|
|
3038
|
-
}
|
|
3039
|
-
};
|
|
3040
|
-
}
|
|
3041
|
-
|
|
3042
|
-
if (typeof document !== 'undefined') {
|
|
3043
|
-
sheet = (function () {
|
|
3044
|
-
var el = createEl('style', {type : 'text/css'});
|
|
3045
|
-
ins(document.getElementsByTagName('head')[0], el);
|
|
3046
|
-
return el.sheet || el.styleSheet
|
|
3047
|
-
}());
|
|
3048
|
-
|
|
3049
|
-
var probe = css(createEl('group'), {behavior: 'url(#default#VML)'});
|
|
3050
|
-
|
|
3051
|
-
if (!vendor(probe, 'transform') && probe.adj) initVML();
|
|
3052
|
-
else useCssAnimations = vendor(probe, 'animation');
|
|
3053
|
-
}
|
|
3054
|
-
|
|
3055
|
-
return Spinner
|
|
3056
|
-
|
|
3057
|
-
}));
|
|
3058
|
-
});
|
|
3059
|
-
|
|
3060
|
-
var dist = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
3061
|
-
|
|
3062
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3063
|
-
value: true
|
|
3064
|
-
});
|
|
3065
|
-
|
|
3066
|
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
var _react2 = _interopRequireDefault(React__default);
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
var _propTypes2 = _interopRequireDefault(PropTypes__default);
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
var _spin2 = _interopRequireDefault(spin);
|
|
3079
|
-
|
|
3080
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
3081
|
-
|
|
3082
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3083
|
-
|
|
3084
|
-
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
3085
|
-
|
|
3086
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
3087
|
-
|
|
3088
|
-
var Spinner = function (_Component) {
|
|
3089
|
-
_inherits(Spinner, _Component);
|
|
3090
|
-
|
|
3091
|
-
function Spinner() {
|
|
3092
|
-
_classCallCheck(this, Spinner);
|
|
3093
|
-
|
|
3094
|
-
return _possibleConstructorReturn(this, (Spinner.__proto__ || Object.getPrototypeOf(Spinner)).apply(this, arguments));
|
|
3095
|
-
}
|
|
3096
|
-
|
|
3097
|
-
_createClass(Spinner, [{
|
|
3098
|
-
key: 'componentDidMount',
|
|
3099
|
-
value: function componentDidMount() {
|
|
3100
|
-
this.updateSpinner();
|
|
3101
|
-
}
|
|
3102
|
-
}, {
|
|
3103
|
-
key: 'componentDidUpdate',
|
|
3104
|
-
value: function componentDidUpdate() {
|
|
3105
|
-
this.updateSpinner();
|
|
3106
|
-
}
|
|
3107
|
-
}, {
|
|
3108
|
-
key: 'componentWillUnmount',
|
|
3109
|
-
value: function componentWillUnmount() {
|
|
3110
|
-
if (this.spinner) {
|
|
3111
|
-
this.spinner.stop();
|
|
3112
|
-
this.spinner = null;
|
|
3113
|
-
}
|
|
3114
|
-
}
|
|
3115
|
-
}, {
|
|
3116
|
-
key: 'updateSpinner',
|
|
3117
|
-
value: function updateSpinner() {
|
|
3118
|
-
var loaded = this.props.loaded;
|
|
3119
|
-
|
|
3120
|
-
if (!loaded && !this.spinner) {
|
|
3121
|
-
this.spinner = new _spin2.default(this.props.config);
|
|
3122
|
-
this.spinner.spin(this.refs.loader);
|
|
3123
|
-
} else if (loaded && this.spinner) {
|
|
3124
|
-
this.spinner.stop();
|
|
3125
|
-
this.spinner = null;
|
|
3126
|
-
}
|
|
3127
|
-
}
|
|
3128
|
-
}, {
|
|
3129
|
-
key: 'render',
|
|
3130
|
-
value: function render() {
|
|
3131
|
-
var _props = this.props,
|
|
3132
|
-
loaded = _props.loaded,
|
|
3133
|
-
className = _props.className;
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
if (loaded) {
|
|
3137
|
-
return this.props.children ? React__default.Children.only(this.props.children) : null;
|
|
3138
|
-
}
|
|
3139
|
-
|
|
3140
|
-
return _react2.default.createElement('div', { className: className, ref: 'loader' });
|
|
3141
|
-
}
|
|
3142
|
-
}]);
|
|
3143
|
-
|
|
3144
|
-
return Spinner;
|
|
3145
|
-
}(React__default.Component);
|
|
3146
|
-
|
|
3147
|
-
Spinner.propTypes = {
|
|
3148
|
-
className: _propTypes2.default.string,
|
|
3149
|
-
config: _propTypes2.default.object.isRequired,
|
|
3150
|
-
loaded: _propTypes2.default.bool.isRequired,
|
|
3151
|
-
children: _propTypes2.default.node
|
|
3152
|
-
};
|
|
3153
|
-
Spinner.defaultProps = {
|
|
3154
|
-
config: {},
|
|
3155
|
-
loaded: false,
|
|
3156
|
-
className: 'loader'
|
|
3157
|
-
};
|
|
3158
|
-
exports.default = Spinner;
|
|
3159
|
-
});
|
|
3160
|
-
|
|
3161
|
-
var Spinner = _commonjsHelpers.unwrapExports(dist);
|
|
3162
|
-
|
|
3163
|
-
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
3164
|
-
|
|
3165
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$3(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
3166
|
-
function LoginButton(props) {
|
|
3167
|
-
const {
|
|
3168
|
-
children,
|
|
3169
|
-
className,
|
|
3170
|
-
spinner,
|
|
3171
|
-
spinnerConfig
|
|
3172
|
-
} = props,
|
|
3173
|
-
rest = objectWithoutProperties(props, ["children", "className", "spinner", "spinnerConfig"]);
|
|
3174
|
-
|
|
3175
|
-
return React__default.createElement(Login$1, rest, ({
|
|
3176
|
-
loading,
|
|
3177
|
-
handleClick
|
|
3178
|
-
}) => React__default.createElement("button", {
|
|
3179
|
-
type: "button",
|
|
3180
|
-
className: className,
|
|
3181
|
-
onClick: handleClick,
|
|
3182
|
-
disabled: loading
|
|
3183
|
-
}, children, spinner && loading && React__default.createElement(Spinner, {
|
|
3184
|
-
config: spinnerConfig
|
|
3185
|
-
})));
|
|
3186
|
-
}
|
|
3187
|
-
LoginButton.defaultProps = _objectSpread$3({}, Login$1.defaultProps, {
|
|
3188
|
-
className: undefined,
|
|
3189
|
-
spinnerConfig: {},
|
|
3190
|
-
spinner: true
|
|
3191
|
-
});
|
|
3192
|
-
|
|
3193
|
-
class EmbeddedPost extends React.PureComponent {
|
|
3194
|
-
componentDidUpdate() {
|
|
3195
|
-
const {
|
|
3196
|
-
handleParse
|
|
3197
|
-
} = this.props;
|
|
3198
|
-
handleParse();
|
|
3199
|
-
}
|
|
3200
|
-
|
|
3201
|
-
render() {
|
|
3202
|
-
const {
|
|
3203
|
-
href,
|
|
3204
|
-
width,
|
|
3205
|
-
showText,
|
|
3206
|
-
children
|
|
3207
|
-
} = this.props;
|
|
3208
|
-
return React__default.createElement("div", {
|
|
3209
|
-
className: "fb-post",
|
|
3210
|
-
"data-href": href,
|
|
3211
|
-
"data-width": width,
|
|
3212
|
-
"data-show-text": showText
|
|
3213
|
-
}, children);
|
|
3214
|
-
}
|
|
3215
|
-
|
|
3216
|
-
}
|
|
3217
|
-
|
|
3218
|
-
defineProperty(EmbeddedPost, "defaultProps", {
|
|
3219
|
-
width: undefined,
|
|
3220
|
-
showText: undefined,
|
|
3221
|
-
children: undefined
|
|
3222
|
-
});
|
|
3223
|
-
|
|
3224
|
-
React.forwardRef((props, ref) => React__default.createElement(Parser, null, ({
|
|
3225
|
-
handleParse
|
|
3226
|
-
}) => React__default.createElement(EmbeddedPost, _extends_1({}, props, {
|
|
3227
|
-
handleParse: handleParse,
|
|
3228
|
-
ref: ref
|
|
3229
|
-
}))));
|
|
3230
|
-
|
|
3231
|
-
class EmbeddedVideo extends React.PureComponent {
|
|
3232
|
-
componentDidUpdate() {
|
|
3233
|
-
const {
|
|
3234
|
-
handleParse
|
|
3235
|
-
} = this.props;
|
|
3236
|
-
handleParse();
|
|
3237
|
-
}
|
|
3238
|
-
|
|
3239
|
-
render() {
|
|
3240
|
-
const {
|
|
3241
|
-
href,
|
|
3242
|
-
width,
|
|
3243
|
-
showText,
|
|
3244
|
-
allowFullScreen,
|
|
3245
|
-
autoPlay,
|
|
3246
|
-
showCaptions,
|
|
3247
|
-
children
|
|
3248
|
-
} = this.props;
|
|
3249
|
-
return React__default.createElement("div", {
|
|
3250
|
-
className: "fb-video",
|
|
3251
|
-
"data-href": href,
|
|
3252
|
-
"data-width": width,
|
|
3253
|
-
"data-show-text": showText,
|
|
3254
|
-
"data-show-captions": showCaptions,
|
|
3255
|
-
"data-autoplay": autoPlay,
|
|
3256
|
-
"data-allowfullscreen": allowFullScreen
|
|
3257
|
-
}, children);
|
|
3258
|
-
}
|
|
3259
|
-
|
|
3260
|
-
}
|
|
3261
|
-
|
|
3262
|
-
defineProperty(EmbeddedVideo, "defaultProps", {
|
|
3263
|
-
width: undefined,
|
|
3264
|
-
showText: undefined,
|
|
3265
|
-
allowFullScreen: undefined,
|
|
3266
|
-
autoPlay: undefined,
|
|
3267
|
-
showCaptions: undefined,
|
|
3268
|
-
children: undefined
|
|
3269
|
-
});
|
|
3270
|
-
|
|
3271
|
-
React.forwardRef((props, ref) => React__default.createElement(Parser, null, ({
|
|
3272
|
-
handleParse
|
|
3273
|
-
}) => React__default.createElement(EmbeddedVideo, _extends_1({}, props, {
|
|
3274
|
-
handleParse: handleParse,
|
|
3275
|
-
ref: ref
|
|
3276
|
-
}))));
|
|
3277
|
-
|
|
3278
|
-
class Comments extends React.PureComponent {
|
|
3279
|
-
componentDidUpdate() {
|
|
3280
|
-
const {
|
|
3281
|
-
handleParse
|
|
3282
|
-
} = this.props;
|
|
3283
|
-
handleParse();
|
|
3284
|
-
}
|
|
3285
|
-
|
|
3286
|
-
render() {
|
|
3287
|
-
const {
|
|
3288
|
-
colorScheme,
|
|
3289
|
-
href = getCurrentHref(),
|
|
3290
|
-
numPosts,
|
|
3291
|
-
orderBy,
|
|
3292
|
-
width,
|
|
3293
|
-
children,
|
|
3294
|
-
mobile
|
|
3295
|
-
} = this.props;
|
|
3296
|
-
return React__default.createElement("div", {
|
|
3297
|
-
className: "fb-comments",
|
|
3298
|
-
"data-colorscheme": colorScheme,
|
|
3299
|
-
"data-numposts": numPosts,
|
|
3300
|
-
"data-href": href,
|
|
3301
|
-
"data-order-by": orderBy,
|
|
3302
|
-
"data-width": width,
|
|
3303
|
-
"data-skin": colorScheme,
|
|
3304
|
-
"data-mobile": mobile
|
|
3305
|
-
}, children);
|
|
3306
|
-
}
|
|
3307
|
-
|
|
3308
|
-
}
|
|
3309
|
-
|
|
3310
|
-
defineProperty(Comments, "defaultProps", {
|
|
3311
|
-
href: undefined,
|
|
3312
|
-
numPosts: undefined,
|
|
3313
|
-
orderBy: undefined,
|
|
3314
|
-
width: undefined,
|
|
3315
|
-
colorScheme: undefined,
|
|
3316
|
-
children: undefined,
|
|
3317
|
-
mobile: undefined
|
|
3318
|
-
});
|
|
3319
|
-
|
|
3320
|
-
React.forwardRef((props, ref) => React__default.createElement(Parser, null, ({
|
|
3321
|
-
handleParse
|
|
3322
|
-
}) => React__default.createElement(Comments, _extends_1({}, props, {
|
|
3323
|
-
handleParse: handleParse,
|
|
3324
|
-
ref: ref
|
|
3325
|
-
}))));
|
|
3326
|
-
|
|
3327
|
-
class CommentsCount extends React.PureComponent {
|
|
3328
|
-
componentDidUpdate() {
|
|
3329
|
-
const {
|
|
3330
|
-
handleParse
|
|
3331
|
-
} = this.props;
|
|
3332
|
-
handleParse();
|
|
3333
|
-
}
|
|
3334
|
-
|
|
3335
|
-
render() {
|
|
3336
|
-
const {
|
|
3337
|
-
href = getCurrentHref(),
|
|
3338
|
-
children
|
|
3339
|
-
} = this.props;
|
|
3340
|
-
return React__default.createElement("span", {
|
|
3341
|
-
className: "fb-comments-count",
|
|
3342
|
-
"data-href": href
|
|
3343
|
-
}, children);
|
|
3344
|
-
}
|
|
3345
|
-
|
|
3346
|
-
}
|
|
3347
|
-
|
|
3348
|
-
defineProperty(CommentsCount, "defaultProps", {
|
|
3349
|
-
href: undefined,
|
|
3350
|
-
children: undefined
|
|
3351
|
-
});
|
|
3352
|
-
|
|
3353
|
-
React.forwardRef((props, ref) => React__default.createElement(Parser, null, ({
|
|
3354
|
-
handleParse
|
|
3355
|
-
}) => React__default.createElement(CommentsCount, _extends_1({}, props, {
|
|
3356
|
-
handleParse: handleParse,
|
|
3357
|
-
ref: ref
|
|
3358
|
-
}))));
|
|
3359
|
-
|
|
3360
|
-
class Feed extends React.Component {
|
|
3361
|
-
constructor(...args) {
|
|
3362
|
-
var _this;
|
|
3363
|
-
|
|
3364
|
-
super(...args);
|
|
3365
|
-
_this = this;
|
|
3366
|
-
|
|
3367
|
-
defineProperty(this, "handleClick",
|
|
3368
|
-
/*#__PURE__*/
|
|
3369
|
-
function () {
|
|
3370
|
-
var _ref = asyncToGenerator(function* (evn) {
|
|
3371
|
-
evn.preventDefault();
|
|
3372
|
-
const {
|
|
3373
|
-
handleProcess
|
|
3374
|
-
} = _this.props;
|
|
3375
|
-
return handleProcess(
|
|
3376
|
-
/*#__PURE__*/
|
|
3377
|
-
function () {
|
|
3378
|
-
var _ref2 = asyncToGenerator(function* (api) {
|
|
3379
|
-
const {
|
|
3380
|
-
link = getCurrentHref(),
|
|
3381
|
-
display,
|
|
3382
|
-
appId = api.getAppId(),
|
|
3383
|
-
redirectURI,
|
|
3384
|
-
from,
|
|
3385
|
-
to,
|
|
3386
|
-
picture,
|
|
3387
|
-
source,
|
|
3388
|
-
name,
|
|
3389
|
-
caption,
|
|
3390
|
-
description,
|
|
3391
|
-
dataRef
|
|
3392
|
-
} = _this.props;
|
|
3393
|
-
return api.ui(clearUndefinedProperties({
|
|
3394
|
-
method: 'feed',
|
|
3395
|
-
link,
|
|
3396
|
-
display,
|
|
3397
|
-
app_id: appId,
|
|
3398
|
-
redirect_uri: redirectURI,
|
|
3399
|
-
from,
|
|
3400
|
-
to,
|
|
3401
|
-
picture,
|
|
3402
|
-
source,
|
|
3403
|
-
name,
|
|
3404
|
-
caption,
|
|
3405
|
-
description,
|
|
3406
|
-
ref: dataRef
|
|
3407
|
-
}));
|
|
3408
|
-
});
|
|
3409
|
-
|
|
3410
|
-
return function (_x2) {
|
|
3411
|
-
return _ref2.apply(this, arguments);
|
|
3412
|
-
};
|
|
3413
|
-
}());
|
|
3414
|
-
});
|
|
3415
|
-
|
|
3416
|
-
return function (_x) {
|
|
3417
|
-
return _ref.apply(this, arguments);
|
|
3418
|
-
};
|
|
3419
|
-
}());
|
|
3420
|
-
}
|
|
3421
|
-
|
|
3422
|
-
render() {
|
|
3423
|
-
const {
|
|
3424
|
-
children,
|
|
3425
|
-
loading,
|
|
3426
|
-
error,
|
|
3427
|
-
data
|
|
3428
|
-
} = this.props;
|
|
3429
|
-
return children({
|
|
3430
|
-
loading,
|
|
3431
|
-
handleClick: this.handleClick,
|
|
3432
|
-
error,
|
|
3433
|
-
data
|
|
3434
|
-
});
|
|
3435
|
-
}
|
|
3436
|
-
|
|
3437
|
-
}
|
|
3438
|
-
|
|
3439
|
-
defineProperty(Feed, "defaultProps", {
|
|
3440
|
-
link: undefined,
|
|
3441
|
-
display: undefined,
|
|
3442
|
-
appId: undefined,
|
|
3443
|
-
redirectURI: undefined,
|
|
3444
|
-
from: undefined,
|
|
3445
|
-
to: undefined,
|
|
3446
|
-
source: undefined,
|
|
3447
|
-
picture: undefined,
|
|
3448
|
-
name: undefined,
|
|
3449
|
-
caption: undefined,
|
|
3450
|
-
description: undefined,
|
|
3451
|
-
dataRef: undefined
|
|
3452
|
-
});
|
|
3453
|
-
|
|
3454
|
-
React.forwardRef((props, ref) => React__default.createElement(Process, null, ({
|
|
3455
|
-
loading,
|
|
3456
|
-
handleProcess,
|
|
3457
|
-
error,
|
|
3458
|
-
data
|
|
3459
|
-
}) => React__default.createElement(Feed, _extends_1({}, props, {
|
|
3460
|
-
loading: loading,
|
|
3461
|
-
handleProcess: handleProcess,
|
|
3462
|
-
data: data,
|
|
3463
|
-
error: error,
|
|
3464
|
-
ref: ref
|
|
3465
|
-
}))));
|
|
3466
|
-
|
|
3467
|
-
class Group extends React.PureComponent {
|
|
3468
|
-
componentDidUpdate() {
|
|
3469
|
-
const {
|
|
3470
|
-
handleParse
|
|
3471
|
-
} = this.props;
|
|
3472
|
-
handleParse();
|
|
3473
|
-
}
|
|
3474
|
-
|
|
3475
|
-
render() {
|
|
3476
|
-
const {
|
|
3477
|
-
style,
|
|
3478
|
-
href = getCurrentHref(),
|
|
3479
|
-
width,
|
|
3480
|
-
showSocialContext,
|
|
3481
|
-
showMetaData,
|
|
3482
|
-
children,
|
|
3483
|
-
skin
|
|
3484
|
-
} = this.props;
|
|
3485
|
-
return React__default.createElement("div", {
|
|
3486
|
-
className: "fb-group",
|
|
3487
|
-
style: style,
|
|
3488
|
-
"data-href": href,
|
|
3489
|
-
"data-width": width,
|
|
3490
|
-
"data-show-social-context": showSocialContext,
|
|
3491
|
-
"data-show-metadata": showMetaData,
|
|
3492
|
-
"data-skin": skin
|
|
3493
|
-
}, children);
|
|
3494
|
-
}
|
|
3495
|
-
|
|
3496
|
-
}
|
|
3497
|
-
|
|
3498
|
-
defineProperty(Group, "defaultProps", {
|
|
3499
|
-
showSocialContext: undefined,
|
|
3500
|
-
showMetaData: undefined,
|
|
3501
|
-
width: undefined,
|
|
3502
|
-
children: undefined,
|
|
3503
|
-
style: undefined,
|
|
3504
|
-
href: undefined,
|
|
3505
|
-
skin: undefined
|
|
3506
|
-
});
|
|
3507
|
-
|
|
3508
|
-
React.forwardRef((props, ref) => React__default.createElement(Parser, null, ({
|
|
3509
|
-
handleParse
|
|
3510
|
-
}) => React__default.createElement(Group, _extends_1({}, props, {
|
|
3511
|
-
handleParse: handleParse,
|
|
3512
|
-
ref: ref
|
|
3513
|
-
}))));
|
|
3514
|
-
|
|
3515
|
-
class LoginStatus$1 extends React.Component {
|
|
3516
|
-
constructor(..._args) {
|
|
3517
|
-
var _this;
|
|
3518
|
-
|
|
3519
|
-
super(..._args);
|
|
3520
|
-
_this = this;
|
|
3521
|
-
|
|
3522
|
-
defineProperty(this, "state", {});
|
|
3523
|
-
|
|
3524
|
-
defineProperty(this, "handleReady",
|
|
3525
|
-
/*#__PURE__*/
|
|
3526
|
-
function () {
|
|
3527
|
-
var _ref = asyncToGenerator(function* (api) {
|
|
3528
|
-
const {
|
|
3529
|
-
event
|
|
3530
|
-
} = _this.props;
|
|
3531
|
-
|
|
3532
|
-
_this.setState({
|
|
3533
|
-
api
|
|
3534
|
-
});
|
|
3535
|
-
|
|
3536
|
-
yield api.subscribe(event, _this.handleChange);
|
|
3537
|
-
});
|
|
3538
|
-
|
|
3539
|
-
return function (_x) {
|
|
3540
|
-
return _ref.apply(this, arguments);
|
|
3541
|
-
};
|
|
3542
|
-
}());
|
|
3543
|
-
|
|
3544
|
-
defineProperty(this, "handleChange", (...args) => {
|
|
3545
|
-
const {
|
|
3546
|
-
onChange
|
|
3547
|
-
} = this.props;
|
|
3548
|
-
|
|
3549
|
-
if (onChange) {
|
|
3550
|
-
onChange(...args);
|
|
3551
|
-
}
|
|
3552
|
-
});
|
|
3553
|
-
}
|
|
3554
|
-
|
|
3555
|
-
componentWillUnmount() {
|
|
3556
|
-
const {
|
|
3557
|
-
state: {
|
|
3558
|
-
api
|
|
3559
|
-
},
|
|
3560
|
-
props: {
|
|
3561
|
-
event
|
|
3562
|
-
}
|
|
3563
|
-
} = this;
|
|
3564
|
-
|
|
3565
|
-
if (api) {
|
|
3566
|
-
api.unsubscribe(event, this.handleChange);
|
|
3567
|
-
}
|
|
3568
|
-
}
|
|
3569
|
-
|
|
3570
|
-
render() {
|
|
3571
|
-
const {
|
|
3572
|
-
children
|
|
3573
|
-
} = this.props;
|
|
3574
|
-
return React__default.createElement(Initialize$1, {
|
|
3575
|
-
onReady: this.handleReady
|
|
3576
|
-
}, children);
|
|
3577
|
-
}
|
|
3578
|
-
|
|
3579
|
-
}
|
|
3580
|
-
|
|
3581
|
-
defineProperty(LoginStatus$1, "defaultProps", {
|
|
3582
|
-
onChange: undefined
|
|
3583
|
-
});
|
|
3584
|
-
|
|
3585
|
-
class Profile extends React.Component {
|
|
3586
|
-
constructor(...args) {
|
|
3587
|
-
var _this;
|
|
3588
|
-
|
|
3589
|
-
super(...args);
|
|
3590
|
-
_this = this;
|
|
3591
|
-
|
|
3592
|
-
defineProperty(this, "state", {
|
|
3593
|
-
loading: true
|
|
3594
|
-
});
|
|
3595
|
-
|
|
3596
|
-
defineProperty(this, "handleReady",
|
|
3597
|
-
/*#__PURE__*/
|
|
3598
|
-
function () {
|
|
3599
|
-
var _ref = asyncToGenerator(function* (api) {
|
|
3600
|
-
_this.api = api;
|
|
3601
|
-
|
|
3602
|
-
_this.updateProfile();
|
|
3603
|
-
});
|
|
3604
|
-
|
|
3605
|
-
return function (_x) {
|
|
3606
|
-
return _ref.apply(this, arguments);
|
|
3607
|
-
};
|
|
3608
|
-
}());
|
|
3609
|
-
|
|
3610
|
-
defineProperty(this, "handleStatusChange", () => {
|
|
3611
|
-
this.updateProfile();
|
|
3612
|
-
});
|
|
3613
|
-
}
|
|
3614
|
-
|
|
3615
|
-
updateProfile() {
|
|
3616
|
-
var _this2 = this;
|
|
3617
|
-
|
|
3618
|
-
return asyncToGenerator(function* () {
|
|
3619
|
-
const {
|
|
3620
|
-
api,
|
|
3621
|
-
props: {
|
|
3622
|
-
fields
|
|
3623
|
-
}
|
|
3624
|
-
} = _this2;
|
|
3625
|
-
|
|
3626
|
-
if (!api) {
|
|
3627
|
-
return;
|
|
3628
|
-
}
|
|
3629
|
-
|
|
3630
|
-
try {
|
|
3631
|
-
const response = yield api.getLoginStatus();
|
|
3632
|
-
|
|
3633
|
-
if (response.status !== LoginStatus.CONNECTED) {
|
|
3634
|
-
_this2.setState({
|
|
3635
|
-
profile: undefined,
|
|
3636
|
-
loading: false,
|
|
3637
|
-
error: undefined
|
|
3638
|
-
});
|
|
3639
|
-
|
|
3640
|
-
return;
|
|
3641
|
-
}
|
|
3642
|
-
|
|
3643
|
-
const profile = yield api.getProfile({
|
|
3644
|
-
fields
|
|
3645
|
-
});
|
|
3646
|
-
|
|
3647
|
-
_this2.setState({
|
|
3648
|
-
profile,
|
|
3649
|
-
loading: false,
|
|
3650
|
-
error: undefined
|
|
3651
|
-
});
|
|
3652
|
-
} catch (error) {
|
|
3653
|
-
_this2.setState({
|
|
3654
|
-
profile: undefined,
|
|
3655
|
-
loading: false,
|
|
3656
|
-
error
|
|
3657
|
-
});
|
|
3658
|
-
}
|
|
3659
|
-
})();
|
|
3660
|
-
}
|
|
3661
|
-
|
|
3662
|
-
render() {
|
|
3663
|
-
const {
|
|
3664
|
-
children
|
|
3665
|
-
} = this.props;
|
|
3666
|
-
const {
|
|
3667
|
-
profile,
|
|
3668
|
-
loading,
|
|
3669
|
-
error
|
|
3670
|
-
} = this.state;
|
|
3671
|
-
return React__default.createElement(Initialize$1, {
|
|
3672
|
-
onReady: this.handleReady
|
|
3673
|
-
}, React__default.createElement(LoginStatus$1, {
|
|
3674
|
-
event: "auth.statusChange",
|
|
3675
|
-
onChange: this.handleStatusChange
|
|
3676
|
-
}, children({
|
|
3677
|
-
profile,
|
|
3678
|
-
loading,
|
|
3679
|
-
error
|
|
3680
|
-
})));
|
|
3681
|
-
}
|
|
3682
|
-
|
|
3683
|
-
}
|
|
3684
|
-
|
|
3685
|
-
defineProperty(Profile, "defaultProps", {
|
|
3686
|
-
fields: Fields
|
|
3687
|
-
});
|
|
3688
|
-
|
|
3689
|
-
class CustomChat extends React.PureComponent {
|
|
3690
|
-
componentDidUpdate() {
|
|
3691
|
-
const {
|
|
3692
|
-
handleParse
|
|
3693
|
-
} = this.props;
|
|
3694
|
-
handleParse();
|
|
3695
|
-
}
|
|
3696
|
-
|
|
3697
|
-
render() {
|
|
3698
|
-
const {
|
|
3699
|
-
children,
|
|
3700
|
-
pageId,
|
|
3701
|
-
themeColor,
|
|
3702
|
-
loggedInGreeting,
|
|
3703
|
-
loggedOutGreeting,
|
|
3704
|
-
dataRef,
|
|
3705
|
-
greetingDialogDisplay,
|
|
3706
|
-
greetingDialogDelay
|
|
3707
|
-
} = this.props;
|
|
3708
|
-
return React__default.createElement("div", {
|
|
3709
|
-
className: "fb-customerchat",
|
|
3710
|
-
page_id: pageId,
|
|
3711
|
-
theme_color: themeColor,
|
|
3712
|
-
logged_in_greeting: loggedInGreeting,
|
|
3713
|
-
logged_out_greeting: loggedOutGreeting,
|
|
3714
|
-
greeting_dialog_display: greetingDialogDisplay,
|
|
3715
|
-
greeting_dialog_delay: greetingDialogDelay,
|
|
3716
|
-
"data-ref": dataRef
|
|
3717
|
-
}, children);
|
|
3718
|
-
}
|
|
3719
|
-
|
|
3720
|
-
}
|
|
3721
|
-
|
|
3722
|
-
defineProperty(CustomChat, "defaultProps", {
|
|
3723
|
-
children: undefined,
|
|
3724
|
-
themeColor: undefined,
|
|
3725
|
-
loggedInGreeting: undefined,
|
|
3726
|
-
loggedOutGreeting: undefined,
|
|
3727
|
-
dataRef: undefined,
|
|
3728
|
-
greetingDialogDisplay: undefined,
|
|
3729
|
-
greetingDialogDelay: undefined
|
|
3730
|
-
});
|
|
3731
|
-
|
|
3732
|
-
React.forwardRef((props, ref) => React__default.createElement(Parser, null, ({
|
|
3733
|
-
handleParse
|
|
3734
|
-
}) => React__default.createElement(CustomChat, _extends_1({}, props, {
|
|
3735
|
-
handleParse: handleParse,
|
|
3736
|
-
ref: ref
|
|
3737
|
-
}))));
|
|
3738
|
-
|
|
3739
|
-
class MessageUs extends React.PureComponent {
|
|
3740
|
-
componentDidUpdate() {
|
|
3741
|
-
const {
|
|
3742
|
-
handleParse
|
|
3743
|
-
} = this.props;
|
|
3744
|
-
handleParse();
|
|
3745
|
-
}
|
|
3746
|
-
|
|
3747
|
-
render() {
|
|
3748
|
-
const {
|
|
3749
|
-
color,
|
|
3750
|
-
messengerAppId,
|
|
3751
|
-
pageId,
|
|
3752
|
-
children,
|
|
3753
|
-
size
|
|
3754
|
-
} = this.props;
|
|
3755
|
-
return React__default.createElement("div", {
|
|
3756
|
-
className: "fb-messengermessageus",
|
|
3757
|
-
messenger_app_id: messengerAppId,
|
|
3758
|
-
page_id: pageId,
|
|
3759
|
-
"data-color": color,
|
|
3760
|
-
"data-size": size
|
|
3761
|
-
}, children);
|
|
3762
|
-
}
|
|
3763
|
-
|
|
3764
|
-
}
|
|
3765
|
-
|
|
3766
|
-
defineProperty(MessageUs, "defaultProps", {
|
|
3767
|
-
color: undefined,
|
|
3768
|
-
size: undefined,
|
|
3769
|
-
children: undefined
|
|
3770
|
-
});
|
|
3771
|
-
|
|
3772
|
-
React.forwardRef((props, ref) => React__default.createElement(Parser, null, ({
|
|
3773
|
-
handleParse
|
|
3774
|
-
}) => React__default.createElement(MessageUs, _extends_1({}, props, {
|
|
3775
|
-
handleParse: handleParse,
|
|
3776
|
-
ref: ref
|
|
3777
|
-
}))));
|
|
3778
|
-
|
|
3779
|
-
class MessengerCheckbox extends React.PureComponent {
|
|
3780
|
-
componentDidUpdate() {
|
|
3781
|
-
const {
|
|
3782
|
-
handleParse
|
|
3783
|
-
} = this.props;
|
|
3784
|
-
handleParse();
|
|
3785
|
-
}
|
|
3786
|
-
|
|
3787
|
-
render() {
|
|
3788
|
-
const {
|
|
3789
|
-
origin,
|
|
3790
|
-
prechecked,
|
|
3791
|
-
allowLogin,
|
|
3792
|
-
userRef,
|
|
3793
|
-
messengerAppId,
|
|
3794
|
-
pageId,
|
|
3795
|
-
children,
|
|
3796
|
-
size,
|
|
3797
|
-
centerAlign,
|
|
3798
|
-
skin
|
|
3799
|
-
} = this.props;
|
|
3800
|
-
return React__default.createElement("div", {
|
|
3801
|
-
className: "fb-messenger-checkbox",
|
|
3802
|
-
messenger_app_id: messengerAppId,
|
|
3803
|
-
page_id: pageId,
|
|
3804
|
-
size: size,
|
|
3805
|
-
origin: origin,
|
|
3806
|
-
user_ref: userRef,
|
|
3807
|
-
prechecked: prechecked,
|
|
3808
|
-
allow_login: allowLogin,
|
|
3809
|
-
skin: skin,
|
|
3810
|
-
center_align: centerAlign
|
|
3811
|
-
}, children);
|
|
3812
|
-
}
|
|
3813
|
-
|
|
3814
|
-
}
|
|
3815
|
-
|
|
3816
|
-
defineProperty(MessengerCheckbox, "defaultProps", {
|
|
3817
|
-
size: undefined,
|
|
3818
|
-
allowLogin: undefined,
|
|
3819
|
-
prechecked: undefined,
|
|
3820
|
-
userRef: undefined,
|
|
3821
|
-
children: undefined,
|
|
3822
|
-
origin: undefined,
|
|
3823
|
-
skin: undefined,
|
|
3824
|
-
centerAlign: undefined
|
|
3825
|
-
});
|
|
3826
|
-
|
|
3827
|
-
React.forwardRef((props, ref) => React__default.createElement(Parser, null, ({
|
|
3828
|
-
handleParse
|
|
3829
|
-
}) => React__default.createElement(MessengerCheckbox, _extends_1({}, props, {
|
|
3830
|
-
handleParse: handleParse,
|
|
3831
|
-
ref: ref
|
|
3832
|
-
}))));
|
|
3833
|
-
|
|
3834
|
-
// import MessengerColor from './constants/MessengerColor';
|
|
3835
|
-
|
|
3836
|
-
class SendToMessenger extends React.PureComponent {
|
|
3837
|
-
componentDidUpdate() {
|
|
3838
|
-
const {
|
|
3839
|
-
handleParse
|
|
3840
|
-
} = this.props;
|
|
3841
|
-
handleParse();
|
|
3842
|
-
}
|
|
3843
|
-
|
|
3844
|
-
render() {
|
|
3845
|
-
const {
|
|
3846
|
-
color,
|
|
3847
|
-
messengerAppId,
|
|
3848
|
-
pageId,
|
|
3849
|
-
children,
|
|
3850
|
-
dataRef,
|
|
3851
|
-
size
|
|
3852
|
-
} = this.props;
|
|
3853
|
-
return React__default.createElement("div", {
|
|
3854
|
-
className: "fb-send-to-messenger",
|
|
3855
|
-
messenger_app_id: messengerAppId,
|
|
3856
|
-
page_id: pageId,
|
|
3857
|
-
"data-color": color,
|
|
3858
|
-
"data-size": size,
|
|
3859
|
-
"data-ref": dataRef
|
|
3860
|
-
}, children);
|
|
3861
|
-
}
|
|
3862
|
-
|
|
3863
|
-
}
|
|
3864
76
|
|
|
3865
|
-
|
|
3866
|
-
color: undefined,
|
|
3867
|
-
size: undefined,
|
|
3868
|
-
dataRef: undefined,
|
|
3869
|
-
children: undefined
|
|
3870
|
-
});
|
|
77
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
3871
78
|
|
|
3872
|
-
|
|
3873
|
-
handleParse
|
|
3874
|
-
}) => React__default.createElement(SendToMessenger, _extends_1({}, props, {
|
|
3875
|
-
handleParse: handleParse,
|
|
3876
|
-
ref: ref
|
|
3877
|
-
}))));
|
|
79
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
3878
80
|
|
|
3879
81
|
var ImageSlider = function ImageSlider(props) {
|
|
3880
82
|
var innerSlider = React.useRef(null);
|
|
@@ -3983,61 +185,61 @@ var ImageSlider = function ImageSlider(props) {
|
|
|
3983
185
|
}, []);
|
|
3984
186
|
|
|
3985
187
|
var variant = 'black';
|
|
3986
|
-
return React__default.createElement(
|
|
3987
|
-
React__default.Fragment,
|
|
188
|
+
return React__default['default'].createElement(
|
|
189
|
+
React__default['default'].Fragment,
|
|
3988
190
|
null,
|
|
3989
|
-
React__default.createElement(
|
|
191
|
+
React__default['default'].createElement(
|
|
3990
192
|
'div',
|
|
3991
193
|
{ ref: viewableWindow, id: 'vid-slider', className: 'col' },
|
|
3992
|
-
React__default.createElement(
|
|
194
|
+
React__default['default'].createElement(
|
|
3993
195
|
'div',
|
|
3994
196
|
{ className: 'row' },
|
|
3995
|
-
showScroller && React__default.createElement(
|
|
197
|
+
showScroller && React__default['default'].createElement(
|
|
3996
198
|
'div',
|
|
3997
199
|
{ onClick: function onClick(e) {
|
|
3998
200
|
return scrollSlider(e, 'prev');
|
|
3999
201
|
}, className: 'tile__slider-prev', style: { color: variant } },
|
|
4000
|
-
React__default.createElement('i', { style: { border: 'solid ' + variant, borderWidth: '0 4px 4px 0' }, className: 'arrow left' })
|
|
202
|
+
React__default['default'].createElement('i', { style: { border: 'solid ' + variant, borderWidth: '0 4px 4px 0' }, className: 'arrow left' })
|
|
4001
203
|
),
|
|
4002
|
-
showScroller && React__default.createElement(
|
|
204
|
+
showScroller && React__default['default'].createElement(
|
|
4003
205
|
'div',
|
|
4004
206
|
{ onClick: function onClick(e) {
|
|
4005
207
|
return scrollSlider(e, 'next');
|
|
4006
208
|
}, className: 'tile__slider-next', style: { color: variant } },
|
|
4007
|
-
React__default.createElement('i', { style: { border: 'solid ' + variant, borderWidth: '0 4px 4px 0' }, className: 'arrow right' })
|
|
209
|
+
React__default['default'].createElement('i', { style: { border: 'solid ' + variant, borderWidth: '0 4px 4px 0' }, className: 'arrow right' })
|
|
4008
210
|
),
|
|
4009
|
-
React__default.createElement(
|
|
211
|
+
React__default['default'].createElement(
|
|
4010
212
|
'div',
|
|
4011
213
|
{ ref: innerSlider, className: 'row__inner' },
|
|
4012
214
|
props.data.slides.map(function (img, index) {
|
|
4013
|
-
var thumbnail = urlFor
|
|
215
|
+
var thumbnail = urlFor({ client: client, source: img.slideshowImage, imageWidth: 250 });
|
|
4014
216
|
if (!img.slideshowImage.link) {
|
|
4015
|
-
return React__default.createElement(
|
|
217
|
+
return React__default['default'].createElement(
|
|
4016
218
|
'div',
|
|
4017
219
|
{ ref: tile, key: index, className: 'tile', style: { width: tileSize + 'px' } },
|
|
4018
|
-
React__default.createElement(
|
|
220
|
+
React__default['default'].createElement(
|
|
4019
221
|
'div',
|
|
4020
222
|
{ className: 'tile__media' },
|
|
4021
|
-
React__default.createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '', style: { width: tileSize + 'px' } })
|
|
223
|
+
React__default['default'].createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '', style: { width: tileSize + 'px' } })
|
|
4022
224
|
),
|
|
4023
|
-
React__default.createElement('div', { style: { color: variant }, className: 'tile__info' })
|
|
225
|
+
React__default['default'].createElement('div', { style: { color: variant }, className: 'tile__info' })
|
|
4024
226
|
);
|
|
4025
227
|
} else {
|
|
4026
|
-
return React__default.createElement(
|
|
228
|
+
return React__default['default'].createElement(
|
|
4027
229
|
'a',
|
|
4028
230
|
{ ref: tile, key: index, href: img.slideshowImage.link, target: img.slideshowImage.blank ? '_target' : '_self', className: 'tile', style: { width: tileSize + 'px' } },
|
|
4029
|
-
React__default.createElement(
|
|
231
|
+
React__default['default'].createElement(
|
|
4030
232
|
'div',
|
|
4031
233
|
{ className: 'tile__media' },
|
|
4032
|
-
React__default.createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '', style: { width: tileSize + 'px' } })
|
|
234
|
+
React__default['default'].createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '', style: { width: tileSize + 'px' } })
|
|
4033
235
|
),
|
|
4034
|
-
React__default.createElement('div', { style: { color: variant }, className: 'tile__info' })
|
|
236
|
+
React__default['default'].createElement('div', { style: { color: variant }, className: 'tile__info' })
|
|
4035
237
|
);
|
|
4036
238
|
}
|
|
4037
239
|
})
|
|
4038
240
|
)
|
|
4039
241
|
),
|
|
4040
|
-
React__default.createElement(
|
|
242
|
+
React__default['default'].createElement(
|
|
4041
243
|
'style',
|
|
4042
244
|
{ jsx: 'true' },
|
|
4043
245
|
'\n #vid-slider * {\n box-sizing: border-box;\n -ms-overflow-style: none;\n }\n #vid-slider::-webkit-scrollbar-thumb {\n display: none;\n }\n #vid-slider::-webkit-scrollbar {\n display: none;\n }\n #vid-slider .row::-webkit-scrollbar {\n display: none;\n }\n #vid-slider .row::-webkit-scrollbar-thumb {\n display: none;\n }\n #vid-slider {\n position: relative;\n -ms-overflow-style: none;\n padding: 0 1.5rem;\n margin-bottom: 0 !important;\n }\n #vid-slider .now-playing {\n position: absolute;\n top: 0.5rem;\n left: 1rem;\n color: white;\n background: rgba(0, 0, 0, 0.75);\n }\n #vid-slider h1,\n #vid-slider p {\n text-align: center;\n width: 100%;\n max-width: 500px;\n margin: auto;\n }\n #vid-slider,\n #vidHolder {\n max-width: 805px;\n }\n #vid-slider a:link,\n #vid-slider a:hover,\n #vid-slider a:active,\n #vid-slider a:visited {\n transition: color 150ms;\n color: #95a5a6;\n text-decoration: none;\n }\n #vid-slider a:hover {\n color: #7f8c8d;\n text-decoration: underline;\n }\n #vid-slider .contain {\n width: 100%;\n }\n #vid-slider .row {\n overflow-x: scroll;\n width: 100%;\n -ms-overflow-style: none;\n overflow-y: hidden !important;\n }\n #vid-slider .tile__info {\n white-space: normal !important;\n position: absolute;\n text-align: center;\n color: ' + (props.dark ? 'white' : '#383838') + ';\n opacity: 1;\n font-size: 0.9rem;\n font-weight: bold;\n transition: opacity 0.25s;\n }\n #vid-slider .row__inner {\n transition: 450ms -webkit-transform;\n transition: 450ms transform;\n transition: 450ms transform, 450ms -webkit-transform;\n font-size: 0;\n white-space: nowrap;\n margin: 25px 0 70px !important;\n padding-bottom: 10px;\n padding-left: 0;\n }\n #vid-slider .tile {\n position: relative;\n display: inline-block;\n margin: 0 12px;\n font-size: 20px;\n transition: 450ms all;\n -webkit-transform-origin: center left;\n transform-origin: center left;\n }\n \n #vid-slider .tile:first-child {\n margin-left: 15px;\n }\n #vid-slider .tile__img {\n height: auto;\n -o-object-fit: contain;\n object-fit: contain;\n object-position: center;\n }\n #vid-slider .tile__details {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n font-size: 10px;\n opacity: 0;\n background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);\n transition: 450ms opacity;\n }\n #vid-slider .tile__details:after,\n #vid-slider .tile__details:before {\n content: \'\';\n \n position: absolute;\n top: 50%;\n left: 50%;\n display: #000;\n }\n #vid-slider .tile__details:after {\n margin-top: -25px;\n margin-left: -25px;\n width: 50px;\n height: 50px;\n border: 3px solid #ecf0f1;\n line-height: 50px;\n text-align: center;\n border-radius: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1;\n }\n #vid-slider .tile__details:before {\n content: \'\';\n background: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 64 64\' width=\'64\' height=\'64\' fill=\'white\'><path d=\'M26 46 L46 32 L26 18 Z\'/></svg>")\n no-repeat center center;\n left: 0;\n width: 100%;\n height: 3rem;\n font-size: 30px;\n margin-right: 12px;\n margin-top: -24px;\n text-align: center;\n z-index: 2;\n color: white;\n }\n \n #vid-slider .tile__title {\n position: absolute;\n bottom: 0;\n padding: 10px;\n max-width: 250px;\n }\n #vid-slider .tile__title_text {\n position: relative;\n left: 0;\n white-space: normal;\n }\n \n #vid-slider .tile__slider-prev,\n #vid-slider .tile__slider-next {\n width: 30px;\n background: transparent;\n border: none;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n z-index: 99;\n cursor: pointer;\n color: ' + (props.dark ? 'white' : 'black') + ';\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 2rem;\n }\n #vid-slider .tile__slider-prev {\n left: -0.5rem;\n padding: 1rem;\n }\n #vid-slider .tile__slider-next {\n right: -0.5rem;\n padding: 1rem;\n }\n #vid-slider,\n #vid-slider .row {\n margin: 0;\n }\n \n #vid-slider .row::-webkit-scrollbar-thumb {\n background-color: transparent !important;\n }\n #vid-slider i {\n border: solid ' + (props.dark ? 'white' : 'black') + ';\n border-width: 0 4px 4px 0;\n display: inline-block;\n padding: 4px;\n pointer-events: none;\n }\n #vid-slider .right {\n transform: rotate(-45deg);\n -webkit-transform: rotate(-45deg);\n }\n #vid-slider .left {\n transform: rotate(135deg);\n -webkit-transform: rotate(135deg);\n }\n @media screen and (min-width: 1399px) {\n .block-content #vid-slider .tile__img {\n height: auto;\n }\n .block-content #vid-slider .tile {\n height: auto;\n }\n }\n \n @media screen and (max-width: 1399px) {\n #vid-slider,\n #vidHolder {\n max-width: 620px;\n }\n }\n @media screen and (max-width: 1200px) {\n #vid-slider,\n #vidHolder {\n max-width: 580px;\n }\n }\n @media screen and (max-width: 967px) {\n #vid-slider {\n max-width: 100%;\n }\n \n #vid-slider .row__inner {\n margin: 60px 0 50px !important;\n }\n }\n \n @media screen and (max-width: 768px) {\n #vidHolder {\n position: unset;\n width: 100%;\n }\n }\n @media screen and (max-width: 568px) {\n #vidHolder {\n position: unset;\n width: 100%;\n }\n \n #vid-slider .row__inner {\n margin: 30px 0 70px;\n }\n }\n '
|
|
@@ -4065,114 +267,114 @@ var PartnerDetails = function PartnerDetails(_ref) {
|
|
|
4065
267
|
pageview = _ref.pageview,
|
|
4066
268
|
page = _ref.page;
|
|
4067
269
|
|
|
4068
|
-
return React__default.createElement(
|
|
4069
|
-
React__default.Fragment,
|
|
270
|
+
return React__default['default'].createElement(
|
|
271
|
+
React__default['default'].Fragment,
|
|
4070
272
|
null,
|
|
4071
|
-
React__default.createElement(Breadcrumbs, null),
|
|
4072
|
-
React__default.createElement(
|
|
273
|
+
React__default['default'].createElement(Breadcrumbs, null),
|
|
274
|
+
React__default['default'].createElement(
|
|
4073
275
|
'div',
|
|
4074
276
|
{ className: 'partners-page' },
|
|
4075
|
-
React__default.createElement(
|
|
277
|
+
React__default['default'].createElement(
|
|
4076
278
|
'div',
|
|
4077
279
|
{ className: 'my-5 partner-logo-wrap', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
|
|
4078
|
-
partnerDetails.thumbnail && partnerDetails.thumbnail.link ? React__default.createElement(
|
|
280
|
+
partnerDetails.thumbnail && partnerDetails.thumbnail.link ? React__default['default'].createElement(
|
|
4079
281
|
'a',
|
|
4080
282
|
{ className: 'partners-logo', style: { width: '25%', minWidth: '25%' }, href: partnerDetails.thumbnail.link, target: partnerDetails.thumbnail.blank ? '_blank' : '' },
|
|
4081
|
-
React__default.createElement(
|
|
283
|
+
React__default['default'].createElement(
|
|
4082
284
|
'figure',
|
|
4083
285
|
{ style: { width: '100%', textAlign: 'center' } },
|
|
4084
|
-
React__default.createElement('img', {
|
|
286
|
+
React__default['default'].createElement('img', {
|
|
4085
287
|
alt: partnerDetails.thumbnail && partnerDetails.thumbnail.alt ? partnerDetails.thumbnail.alt : partnerDetails.name,
|
|
4086
288
|
style: { maxWidth: '100%' },
|
|
4087
|
-
src: partnerDetails.thumbnail ? urlFor
|
|
289
|
+
src: partnerDetails.thumbnail ? urlFor({ client: client, source: partnerDetails.thumbnail.asset }) : ''
|
|
4088
290
|
}),
|
|
4089
|
-
partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React__default.createElement(
|
|
291
|
+
partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React__default['default'].createElement(
|
|
4090
292
|
'figcaption',
|
|
4091
293
|
null,
|
|
4092
294
|
partnerDetails.thumbnail.caption
|
|
4093
295
|
)
|
|
4094
296
|
)
|
|
4095
|
-
) : React__default.createElement(
|
|
297
|
+
) : React__default['default'].createElement(
|
|
4096
298
|
'figure',
|
|
4097
299
|
{ className: 'partners-logo', style: { width: '25%', minWidth: '25%', textAlign: 'center' } },
|
|
4098
|
-
React__default.createElement('img', {
|
|
300
|
+
React__default['default'].createElement('img', {
|
|
4099
301
|
alt: partnerDetails.thumbnail && partnerDetails.thumbnail.alt ? partnerDetails.thumbnail.alt : partnerDetails.name,
|
|
4100
302
|
style: { maxWidth: '100%' },
|
|
4101
|
-
src: partnerDetails.thumbnail ? urlFor
|
|
303
|
+
src: partnerDetails.thumbnail ? urlFor({ client: client, source: partnerDetails.thumbnail.asset }) : ''
|
|
4102
304
|
}),
|
|
4103
|
-
partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React__default.createElement(
|
|
305
|
+
partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React__default['default'].createElement(
|
|
4104
306
|
'figcaption',
|
|
4105
307
|
null,
|
|
4106
308
|
partnerDetails.thumbnail.caption
|
|
4107
309
|
)
|
|
4108
310
|
),
|
|
4109
|
-
React__default.createElement(
|
|
311
|
+
React__default['default'].createElement(
|
|
4110
312
|
'style',
|
|
4111
313
|
{ jsx: 'true' },
|
|
4112
314
|
'\n @media screen and (max-width: 768px) {\n .partners-logo {\n width: 100%;\n min-width: 100%;\n }\n .partner-logo-wrap {\n flex-wrap: wrap;\n }\n .block-content-partners {\n padding-left: 0 !important;\n }\n }\n '
|
|
4113
315
|
),
|
|
4114
|
-
(partnerDetails.description || partnerDetails.linkedin || partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default.createElement(
|
|
316
|
+
(partnerDetails.description || partnerDetails.linkedin || partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default['default'].createElement(
|
|
4115
317
|
'div',
|
|
4116
318
|
{ className: 'block-content-partners my-4', style: { maxWidth: '100%', paddingLeft: '2rem', flex: '1 1 auto' } },
|
|
4117
|
-
partnerDetails.description && React__default.createElement(BlockContent.BlockContent, _extends
|
|
4118
|
-
(partnerDetails.linkedin || partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default.createElement(
|
|
319
|
+
partnerDetails.description && React__default['default'].createElement(BlockContent.BlockContent, _extends._extends({ serializers: getSerializers.getSerializers(client), blocks: partnerDetails.description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config())),
|
|
320
|
+
(partnerDetails.linkedin || partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default['default'].createElement(
|
|
4119
321
|
'div',
|
|
4120
322
|
null,
|
|
4121
|
-
React__default.createElement(
|
|
323
|
+
React__default['default'].createElement(
|
|
4122
324
|
'p',
|
|
4123
325
|
{ className: 'd-inline-block font-weight-bold' },
|
|
4124
326
|
'Connect with us:'
|
|
4125
327
|
),
|
|
4126
328
|
' ',
|
|
4127
|
-
partnerDetails.linkedin && React__default.createElement(reactSocialIcons.reactSocialIcons_1, {
|
|
329
|
+
partnerDetails.linkedin && React__default['default'].createElement(reactSocialIcons.reactSocialIcons_1, {
|
|
4128
330
|
url: '' + partnerDetails.linkedin + (partnerDetails.linkedin.slice(-1) === '/' ? '' : '/') + 'posts/?feedView=all',
|
|
4129
331
|
target: '_blank',
|
|
4130
332
|
rel: 'noopener noreferrer',
|
|
4131
333
|
style: { height: 30, width: 30 }
|
|
4132
334
|
}),
|
|
4133
|
-
(partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default.createElement(reactSocialIcons.reactSocialIcons_1, { url: partnerDetails.facebook, target: '_blank', rel: 'noopener noreferrer', style: { height: 30, width: 30, marginLeft: '0.25rem' } })
|
|
335
|
+
(partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default['default'].createElement(reactSocialIcons.reactSocialIcons_1, { url: partnerDetails.facebook, target: '_blank', rel: 'noopener noreferrer', style: { height: 30, width: 30, marginLeft: '0.25rem' } })
|
|
4134
336
|
)
|
|
4135
337
|
)
|
|
4136
338
|
),
|
|
4137
|
-
partnerDetails.affiliates && partnerDetails.affiliates[0] && partnerDetails.affiliates[0].slides && React__default.createElement(
|
|
339
|
+
partnerDetails.affiliates && partnerDetails.affiliates[0] && partnerDetails.affiliates[0].slides && React__default['default'].createElement(
|
|
4138
340
|
'div',
|
|
4139
341
|
{ className: 'mb-4', style: { padding: '0 15px' } },
|
|
4140
|
-
partnerDetails.affiliates[0].title && React__default.createElement(
|
|
342
|
+
partnerDetails.affiliates[0].title && React__default['default'].createElement(
|
|
4141
343
|
'h2',
|
|
4142
344
|
{ className: 'bb-gold' },
|
|
4143
345
|
partnerDetails.affiliates[0].title
|
|
4144
346
|
),
|
|
4145
|
-
React__default.createElement(ImageSlider, { client: client, data: partnerDetails.affiliates[0] })
|
|
347
|
+
React__default['default'].createElement(ImageSlider, { client: client, data: partnerDetails.affiliates[0] })
|
|
4146
348
|
),
|
|
4147
|
-
features.length > 0 && React__default.createElement(
|
|
349
|
+
features.length > 0 && React__default['default'].createElement(
|
|
4148
350
|
'div',
|
|
4149
351
|
{ className: ' mb-5' },
|
|
4150
|
-
React__default.createElement(Feature, { dataset: features, client: client })
|
|
352
|
+
React__default['default'].createElement(Feature, { dataset: features, client: client })
|
|
4151
353
|
),
|
|
4152
|
-
(partnerDetails.twitter || partnerDetails.facebook && !checkIsFacebookGroup(partnerDetails.facebook)) && React__default.createElement(
|
|
354
|
+
(partnerDetails.twitter || partnerDetails.facebook && !checkIsFacebookGroup(partnerDetails.facebook)) && React__default['default'].createElement(
|
|
4153
355
|
'div',
|
|
4154
356
|
{ className: 'mb-5', style: { width: '100%', maxWidth: '100%', textAlign: 'center', padding: '15px', border: '2px solid #aaa', borderRadius: '15px' } },
|
|
4155
|
-
partnerDetails.twitter ? React__default.createElement(TwitterTimelineEmbed, { sourceType: 'url', url: partnerDetails.twitter, options: { height: 400 } }) : partnerDetails.facebook && React__default.createElement(
|
|
4156
|
-
|
|
357
|
+
partnerDetails.twitter ? React__default['default'].createElement(reactTwitterEmbed.TwitterTimelineEmbed, { sourceType: 'url', url: partnerDetails.twitter, options: { height: 400 } }) : partnerDetails.facebook && React__default['default'].createElement(
|
|
358
|
+
reactFacebook.FacebookProvider,
|
|
4157
359
|
{ appId: ' ' },
|
|
4158
|
-
React__default.createElement(Page
|
|
360
|
+
React__default['default'].createElement(reactFacebook.Page, { href: partnerDetails.facebook, tabs: 'timeline', width: '500', height: '500' })
|
|
4159
361
|
)
|
|
4160
362
|
),
|
|
4161
|
-
React__default.createElement(
|
|
363
|
+
React__default['default'].createElement(
|
|
4162
364
|
'div',
|
|
4163
365
|
null,
|
|
4164
|
-
posts && posts.length > 0 && React__default.createElement(
|
|
4165
|
-
React__default.Fragment,
|
|
366
|
+
posts && posts.length > 0 && React__default['default'].createElement(
|
|
367
|
+
React__default['default'].Fragment,
|
|
4166
368
|
null,
|
|
4167
|
-
React__default.createElement(
|
|
369
|
+
React__default['default'].createElement(
|
|
4168
370
|
'h2',
|
|
4169
371
|
{ className: 'bb-gold mb-2' },
|
|
4170
372
|
'Latest from ',
|
|
4171
373
|
partnerDetails.name
|
|
4172
374
|
),
|
|
4173
|
-
React__default.createElement('hr', null)
|
|
375
|
+
React__default['default'].createElement('hr', null)
|
|
4174
376
|
),
|
|
4175
|
-
React__default.createElement(QueueDeckExpanded, {
|
|
377
|
+
React__default['default'].createElement(QueueDeckExpanded, {
|
|
4176
378
|
client: client,
|
|
4177
379
|
mapping: Settings.mapping,
|
|
4178
380
|
dataRecord: posts,
|
|
@@ -4195,12 +397,12 @@ var PartnerDetails = function PartnerDetails(_ref) {
|
|
|
4195
397
|
};
|
|
4196
398
|
|
|
4197
399
|
PartnerDetails.returnGetInitialProps = function () {
|
|
4198
|
-
var _ref2 = asyncToGenerator
|
|
400
|
+
var _ref2 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(identifier, partnerPageUrl, partnerDocumentGroupID, params, currentPage, client) {
|
|
4199
401
|
var category = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
4200
402
|
|
|
4201
403
|
var today, featureQuery, partnerQuery, taxonomyQuery, _ref3, _ref4, features, partnerDetails, taxonomyDetails, articlesQuery, articles;
|
|
4202
404
|
|
|
4203
|
-
return asyncToGenerator
|
|
405
|
+
return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
|
|
4204
406
|
while (1) {
|
|
4205
407
|
switch (_context.prev = _context.next) {
|
|
4206
408
|
case 0:
|
|
@@ -4222,7 +424,7 @@ PartnerDetails.returnGetInitialProps = function () {
|
|
|
4222
424
|
taxonomyQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && isShow != false\n && identifier.current == \'' + identifier + '\' && references(*[_type == \'documentGroup\' && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')]._id)] [0] {\n \'id\': _id,\n \'title\': name\n }';
|
|
4223
425
|
}
|
|
4224
426
|
_context.next = 8;
|
|
4225
|
-
return asyncToGenerator
|
|
427
|
+
return asyncToGenerator._Promise.all([client.fetch(featureQuery), client.fetch(partnerQuery), client.fetch(taxonomyQuery)]);
|
|
4226
428
|
|
|
4227
429
|
case 8:
|
|
4228
430
|
_ref3 = _context.sent;
|