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