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