@mjhls/mjh-framework 1.0.672 → 1.0.673-article-series
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 +1 -1
- package/dist/cjs/AD.js +10 -9
- package/dist/cjs/AD300x250.js +10 -9
- package/dist/cjs/AD300x250x600.js +10 -9
- package/dist/cjs/AD728x90.js +11 -10
- package/dist/cjs/ADFloatingFooter.js +12 -11
- package/dist/cjs/ADFooter.js +9 -8
- package/dist/cjs/ADGutter.js +12 -11
- package/dist/cjs/{ADInfeed-9735aff2.js → ADInfeed-bc591de7.js} +11 -9
- package/dist/cjs/ADSkyscraper.js +12 -11
- package/dist/cjs/ADSponsoredResources.js +12 -11
- package/dist/cjs/ADWebcast.js +12 -11
- package/dist/cjs/ADWelcome.js +16 -15
- package/dist/cjs/{ADlgInfeed-6bd11848.js → ADlgInfeed-4b713637.js} +7 -6
- package/dist/cjs/AccordionPanel.js +24 -22
- package/dist/cjs/AdSlot.js +14 -13
- package/dist/cjs/AdSlotsProvider.js +6 -5
- package/dist/cjs/AlphabeticList.js +16 -15
- package/dist/cjs/ArticleCarousel.js +9 -8
- package/dist/cjs/ArticleSeriesListing.js +38 -37
- package/dist/cjs/Auth.js +430 -593
- package/dist/cjs/{AuthorComponent-bb831b74.js → AuthorComponent-ac8972ce.js} +13 -12
- package/dist/cjs/{BlockContent-88f69acd.js → BlockContent-8b494587.js} +25 -24
- package/dist/cjs/Breadcrumbs.js +23 -21
- package/dist/cjs/CMEDeck.js +61 -61
- package/dist/cjs/Column1.js +14 -11
- package/dist/cjs/Column2.js +22 -19
- package/dist/cjs/Column3.js +35 -32
- package/dist/cjs/ConferenceArticleCard.js +19 -18
- package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
- package/dist/cjs/DeckContent.js +77 -73
- package/dist/cjs/DeckQueue.js +73 -69
- package/dist/cjs/{Dfp-b2bc3b97.js → Dfp-fa2c6aad.js} +21 -20
- package/dist/cjs/EventsDeck.js +123 -116
- package/dist/cjs/ExternalResources.js +44 -43
- package/dist/cjs/Feature.js +26 -24
- package/dist/cjs/ForbesHero.js +34 -33
- package/dist/cjs/GridContent.js +153 -149
- package/dist/cjs/GridHero.js +35 -34
- package/dist/cjs/GroupDeck.js +40 -39
- package/dist/cjs/HamMagazine.js +119 -114
- package/dist/cjs/Header.js +13 -11
- package/dist/cjs/Hero.js +11 -10
- package/dist/cjs/HighlightenVideo.js +17 -16
- package/dist/cjs/HorizontalHero.js +25 -24
- package/dist/cjs/IssueContentDeck.js +69 -64
- package/dist/cjs/IssueDeck.js +64 -59
- package/dist/cjs/IssueLanding.js +18 -17
- package/dist/cjs/LeftNav.js +22 -20
- package/dist/cjs/MasterDeck.js +50 -49
- package/dist/cjs/NavDvm.js +68 -63
- package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
- package/dist/cjs/NavMagazine.js +121 -116
- package/dist/cjs/NavNative.js +103 -95
- package/dist/cjs/NavNormal.js +41 -36
- package/dist/cjs/OncliveHero.js +18 -18
- package/dist/cjs/OncliveLargeHero.js +59 -58
- package/dist/cjs/PageFilter.js +9 -8
- package/dist/cjs/PartnerDetailListing.js +1269 -71
- package/dist/cjs/PdfDownload.js +9 -8
- package/dist/cjs/PopUpModal.js +15 -13
- package/dist/cjs/PublicationDeck.js +63 -58
- package/dist/cjs/PublicationLanding.js +52 -48
- package/dist/cjs/QueueDeckExpanded.js +219 -219
- package/dist/cjs/RecentNews.js +23 -22
- package/dist/cjs/RelatedContent.js +22 -21
- package/dist/cjs/RelatedTopicsDropdown.js +22 -19
- package/dist/cjs/RolesDeck.js +32 -27
- package/dist/cjs/Search.js +16 -12
- package/dist/cjs/SideFooter.js +24 -23
- package/dist/cjs/SocialIcons.js +10 -9
- package/dist/cjs/{SocialSearchComponent-962b1344.js → SocialSearchComponent-fde6c921.js} +36 -32
- package/dist/cjs/SocialShare.js +31 -29
- package/dist/cjs/TaxonomyCard.js +59 -54
- package/dist/cjs/TemplateNormal.js +36 -35
- package/dist/cjs/ThumbnailCard.js +19 -17
- package/dist/cjs/Ustream.js +21 -20
- package/dist/cjs/VerticalHero.js +17 -16
- package/dist/cjs/VideoSeriesCard.js +25 -24
- package/dist/cjs/VideoSeriesFilter.js +9 -9
- package/dist/cjs/VideoSeriesListing.js +52 -51
- package/dist/cjs/View.js +183 -179
- package/dist/cjs/YahooHero.js +30 -29
- package/dist/cjs/YoutubeGroup.js +53 -52
- package/dist/cjs/{brightcove-react-player-loader.es-156bd4d6.js → brightcove-react-player-loader.es-5c98aec7.js} +10 -8
- package/dist/cjs/getRelatedArticle.js +354 -5
- package/dist/cjs/getSerializers.js +9 -9
- package/dist/cjs/iconBase-68959171.js +0 -3
- package/dist/cjs/{index-c190d704.js → index-06016cad.js} +361 -351
- package/dist/cjs/{index-2d0a4911.js → index-44481153.js} +9 -8
- package/dist/cjs/{index-5be2866f.js → index-6367b7bf.js} +16 -17
- package/dist/cjs/{index-da796b8c.js → index-8a3fb0bc.js} +12 -10
- package/dist/cjs/index-bd6c9f56.js +211 -0
- package/dist/cjs/{index.es-ab3f2690.js → index.es-f3e47207.js} +28 -11
- package/dist/cjs/{index.esm-ff47db6f.js → index.esm-05850a2f.js} +5 -12
- package/dist/cjs/{index.esm-66ffa47a.js → index.esm-3b9b8952.js} +4 -9
- package/dist/cjs/{index.esm-876ca9ff.js → index.esm-61650d1a.js} +5 -12
- package/dist/cjs/{index.esm-fe549f9c.js → index.esm-dd489d02.js} +20 -20
- package/dist/cjs/index.js +31 -32
- package/dist/cjs/{inherits-513d81cd.js → inherits-87492b40.js} +4 -4
- package/dist/cjs/{lodash-fc2922d0.js → lodash-7fd85bcf.js} +71 -22
- package/dist/cjs/{main-b6c96c8d.js → main-9499b3ef.js} +48 -43
- package/dist/cjs/{moment-66a6a284.js → moment-ca3bd9fb.js} +10 -8
- package/dist/cjs/{react-social-icons-f7f48f71.js → react-social-icons-07939b41.js} +12 -11
- package/dist/cjs/{typeof-725500bc.js → typeof-9d7f610f.js} +1 -1
- package/dist/cjs/urlFor.js +2 -2
- package/dist/cjs/{visibility-sensor-0c45a583.js → visibility-sensor-8b54af99.js} +7 -5
- package/dist/esm/AD.js +7 -7
- package/dist/esm/AD300x250.js +7 -7
- package/dist/esm/AD300x250x600.js +7 -7
- package/dist/esm/AD728x90.js +8 -8
- package/dist/esm/ADFloatingFooter.js +9 -9
- package/dist/esm/ADFooter.js +6 -6
- package/dist/esm/ADGutter.js +9 -9
- package/dist/esm/{ADInfeed-9140aa7d.js → ADInfeed-d1777980.js} +5 -5
- package/dist/esm/ADSkyscraper.js +9 -9
- package/dist/esm/ADSponsoredResources.js +9 -9
- package/dist/esm/ADWebcast.js +9 -9
- package/dist/esm/ADWelcome.js +13 -13
- package/dist/esm/{ADlgInfeed-7656ecd1.js → ADlgInfeed-84282fe8.js} +4 -4
- package/dist/esm/AccordionPanel.js +17 -17
- package/dist/esm/AdSlot.js +5 -5
- package/dist/esm/AdSlotsProvider.js +3 -3
- package/dist/esm/AlphabeticList.js +13 -13
- package/dist/esm/ArticleCarousel.js +6 -6
- package/dist/esm/ArticleSeriesListing.js +32 -32
- package/dist/esm/Auth.js +411 -578
- package/dist/esm/{AuthorComponent-00f13201.js → AuthorComponent-23afa074.js} +10 -10
- package/dist/esm/{BlockContent-a614acdf.js → BlockContent-d05b5b23.js} +3 -3
- package/dist/esm/Breadcrumbs.js +11 -11
- package/dist/esm/CMEDeck.js +58 -58
- package/dist/esm/Column1.js +5 -5
- package/dist/esm/Column2.js +12 -12
- package/dist/esm/Column3.js +24 -24
- package/dist/esm/ConferenceArticleCard.js +13 -13
- package/dist/esm/{ConferenceBanner-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
- package/dist/esm/DeckContent.js +53 -53
- package/dist/esm/DeckQueue.js +46 -46
- package/dist/esm/{Dfp-8a8fca18.js → Dfp-939e8fcf.js} +10 -10
- package/dist/esm/EventsDeck.js +66 -66
- package/dist/esm/ExternalResources.js +37 -37
- package/dist/esm/Feature.js +16 -16
- package/dist/esm/ForbesHero.js +27 -27
- package/dist/esm/GridContent.js +110 -110
- package/dist/esm/GridHero.js +28 -28
- package/dist/esm/GroupDeck.js +35 -35
- package/dist/esm/HamMagazine.js +86 -86
- package/dist/esm/Header.js +7 -7
- package/dist/esm/Hero.js +6 -6
- package/dist/esm/HighlightenVideo.js +14 -14
- package/dist/esm/HorizontalHero.js +20 -20
- package/dist/esm/IssueContentDeck.js +40 -40
- package/dist/esm/IssueDeck.js +33 -33
- package/dist/esm/IssueLanding.js +15 -15
- package/dist/esm/LeftNav.js +16 -16
- package/dist/esm/MasterDeck.js +43 -43
- package/dist/esm/NavDvm.js +43 -43
- package/dist/esm/{NavFooter-e27bd93b.js → NavFooter-c29526b7.js} +12 -12
- package/dist/esm/NavMagazine.js +90 -90
- package/dist/esm/NavNative.js +70 -70
- package/dist/esm/NavNormal.js +21 -21
- package/dist/esm/OncliveHero.js +13 -14
- package/dist/esm/OncliveLargeHero.js +51 -51
- package/dist/esm/PageFilter.js +6 -6
- package/dist/esm/PartnerDetailListing.js +1263 -67
- package/dist/esm/PdfDownload.js +6 -6
- package/dist/esm/PopUpModal.js +8 -8
- package/dist/esm/PublicationDeck.js +34 -34
- package/dist/esm/PublicationLanding.js +28 -28
- package/dist/esm/QueueDeckExpanded.js +199 -199
- package/dist/esm/RecentNews.js +18 -18
- package/dist/esm/RelatedContent.js +16 -16
- package/dist/esm/RelatedTopicsDropdown.js +11 -11
- package/dist/esm/RolesDeck.js +13 -13
- package/dist/esm/Search.js +5 -5
- package/dist/esm/SideFooter.js +19 -19
- package/dist/esm/SocialIcons.js +7 -7
- package/dist/esm/{SocialSearchComponent-75527dfe.js → SocialSearchComponent-a13fc98b.js} +23 -23
- package/dist/esm/SocialShare.js +25 -25
- package/dist/esm/TaxonomyCard.js +35 -35
- package/dist/esm/TemplateNormal.js +29 -29
- package/dist/esm/ThumbnailCard.js +9 -9
- package/dist/esm/Ustream.js +18 -18
- package/dist/esm/VerticalHero.js +12 -12
- package/dist/esm/VideoSeriesCard.js +16 -16
- package/dist/esm/VideoSeriesFilter.js +6 -6
- package/dist/esm/VideoSeriesListing.js +45 -45
- package/dist/esm/View.js +165 -165
- package/dist/esm/YahooHero.js +24 -24
- package/dist/esm/YoutubeGroup.js +38 -38
- package/dist/esm/{brightcove-react-player-loader.es-83f53e4e.js → brightcove-react-player-loader.es-4abff0b1.js} +7 -6
- package/dist/esm/getRelatedArticle.js +354 -5
- package/dist/esm/getSerializers.js +9 -9
- package/dist/esm/{index-93ec3c59.js → index-1819118a.js} +3 -3
- package/dist/esm/{index-983cedab.js → index-45bca0c4.js} +303 -299
- package/dist/esm/{index-d2f90501.js → index-c00b0bbb.js} +16 -17
- package/dist/esm/{index-5f9f807a.js → index-c5fd0af5.js} +4 -4
- package/dist/esm/index-db3bb315.js +207 -0
- package/dist/esm/{index.es-938a3a58.js → index.es-c6222053.js} +25 -9
- package/dist/esm/{index.esm-85cb09e6.js → index.esm-79385203.js} +5 -12
- package/dist/esm/{index.esm-73e847d2.js → index.esm-902766e0.js} +17 -18
- package/dist/esm/{index.esm-cf08bf18.js → index.esm-a8ff922c.js} +5 -12
- package/dist/esm/{index.esm-b08f4b04.js → index.esm-d6f88d94.js} +4 -9
- package/dist/esm/index.js +26 -27
- package/dist/esm/{inherits-7ee3e0c1.js → inherits-596840e8.js} +1 -1
- package/dist/esm/{lodash-17fdfebb.js → lodash-ec8c6b48.js} +71 -22
- package/dist/esm/{main-0465b2a0.js → main-edbd70ac.js} +48 -44
- package/dist/esm/{moment-12415288.js → moment-b6f49411.js} +10 -8
- package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-3822f1ce.js} +5 -5
- package/dist/esm/{typeof-08f2c380.js → typeof-ee095d0c.js} +1 -1
- package/dist/esm/{visibility-sensor-0baa4eea.js → visibility-sensor-082c757b.js} +2 -2
- package/package.json +1 -1
- package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './_commonjsHelpers-0c4b6f40.js';
|
|
1
|
+
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
2
|
import './_to-object-ded78eb9.js';
|
|
3
3
|
import './es6.string.iterator-9b2af4a5.js';
|
|
4
4
|
import './_library-528f1934.js';
|
|
@@ -8,27 +8,27 @@ import './core.get-iterator-method-54d2e411.js';
|
|
|
8
8
|
import './_object-pie-71ac75a4.js';
|
|
9
9
|
import { _ as _extends } from './extends-cc5da797.js';
|
|
10
10
|
import './_object-sap-4d59d5bd.js';
|
|
11
|
-
import './inherits-
|
|
11
|
+
import './inherits-596840e8.js';
|
|
12
12
|
import './define-property-de3fc946.js';
|
|
13
13
|
import './web.dom.iterable-8956f9a5.js';
|
|
14
|
-
import './typeof-
|
|
14
|
+
import './typeof-ee095d0c.js';
|
|
15
15
|
import './_is-array-49698029.js';
|
|
16
|
-
import
|
|
17
|
-
import './index-
|
|
18
|
-
import 'prop-types';
|
|
16
|
+
import React, { Component, useRef, useState, useEffect } from 'react';
|
|
17
|
+
import './index-1819118a.js';
|
|
18
|
+
import PropTypes from 'prop-types';
|
|
19
19
|
import 'react-bootstrap/Row';
|
|
20
20
|
import 'react-bootstrap/Col';
|
|
21
21
|
import 'react-bootstrap/Card';
|
|
22
|
-
import { m as moment } from './moment-
|
|
22
|
+
import { m as moment } from './moment-b6f49411.js';
|
|
23
23
|
import 'next/router';
|
|
24
24
|
import './isSymbol-807e927e.js';
|
|
25
25
|
import './debounce-1a993acf.js';
|
|
26
|
-
import './index.es-
|
|
26
|
+
import './index.es-c6222053.js';
|
|
27
27
|
import 'react-dom';
|
|
28
|
-
import './visibility-sensor-
|
|
28
|
+
import './visibility-sensor-082c757b.js';
|
|
29
29
|
import { i as imageUrlBuilder } from './index-51a80699.js';
|
|
30
|
-
import './index-
|
|
31
|
-
import './main-
|
|
30
|
+
import './index-c5fd0af5.js';
|
|
31
|
+
import './main-edbd70ac.js';
|
|
32
32
|
import './entities-7cc3bf45.js';
|
|
33
33
|
import './stringify-008c8802.js';
|
|
34
34
|
import { _ as _slicedToArray } from './slicedToArray-7021e5df.js';
|
|
@@ -36,20 +36,20 @@ import { a as _asyncToGenerator, r as regenerator, _ as _Promise } from './async
|
|
|
36
36
|
import './_set-species-cede29f8.js';
|
|
37
37
|
import './beam-681a9749.js';
|
|
38
38
|
import './AdSlot.js';
|
|
39
|
-
import './ADInfeed-
|
|
40
|
-
import './lodash-
|
|
41
|
-
import './ADlgInfeed-
|
|
39
|
+
import './ADInfeed-d1777980.js';
|
|
40
|
+
import './lodash-ec8c6b48.js';
|
|
41
|
+
import './ADlgInfeed-84282fe8.js';
|
|
42
42
|
import './getContentCategory-15dcc413.js';
|
|
43
|
-
import './AuthorComponent-
|
|
44
|
-
import { B as BlockContent } from './BlockContent-
|
|
43
|
+
import './AuthorComponent-23afa074.js';
|
|
44
|
+
import { B as BlockContent } from './BlockContent-d05b5b23.js';
|
|
45
45
|
import { s as smoothscroll } from './smoothscroll-4b699764.js';
|
|
46
46
|
import './GroupDeck.js';
|
|
47
47
|
import 'react-bootstrap';
|
|
48
48
|
import QueueDeckExpanded from './QueueDeckExpanded.js';
|
|
49
49
|
import 'react-bootstrap/Button';
|
|
50
|
-
import { g as getSerializers } from './index-
|
|
50
|
+
import { g as getSerializers } from './index-45bca0c4.js';
|
|
51
51
|
import './util-7700fc59.js';
|
|
52
|
-
import './brightcove-react-player-loader.es-
|
|
52
|
+
import './brightcove-react-player-loader.es-4abff0b1.js';
|
|
53
53
|
import 'react-bootstrap/Pagination';
|
|
54
54
|
import 'next/head';
|
|
55
55
|
import 'react-bootstrap/Carousel';
|
|
@@ -57,7 +57,1203 @@ import Feature from './Feature.js';
|
|
|
57
57
|
import 'react-bootstrap/Breadcrumb';
|
|
58
58
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
59
59
|
import urlFor from './urlFor.js';
|
|
60
|
-
|
|
60
|
+
|
|
61
|
+
function _classCallCheck(instance, Constructor) {
|
|
62
|
+
if (!(instance instanceof Constructor)) {
|
|
63
|
+
throw new TypeError("Cannot call a class as a function");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function _defineProperties(target, props) {
|
|
68
|
+
for (var i = 0; i < props.length; i++) {
|
|
69
|
+
var descriptor = props[i];
|
|
70
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
71
|
+
descriptor.configurable = true;
|
|
72
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
73
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
78
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
79
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
80
|
+
return Constructor;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function _typeof(obj) {
|
|
84
|
+
"@babel/helpers - typeof";
|
|
85
|
+
|
|
86
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
87
|
+
_typeof = function _typeof(obj) {
|
|
88
|
+
return typeof obj;
|
|
89
|
+
};
|
|
90
|
+
} else {
|
|
91
|
+
_typeof = function _typeof(obj) {
|
|
92
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return _typeof(obj);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function _assertThisInitialized(self) {
|
|
100
|
+
if (self === void 0) {
|
|
101
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return self;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function _possibleConstructorReturn(self, call) {
|
|
108
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
109
|
+
return call;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return _assertThisInitialized(self);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function _getPrototypeOf(o) {
|
|
116
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
117
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
118
|
+
};
|
|
119
|
+
return _getPrototypeOf(o);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function _setPrototypeOf(o, p) {
|
|
123
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
124
|
+
o.__proto__ = p;
|
|
125
|
+
return o;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
return _setPrototypeOf(o, p);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function _inherits(subClass, superClass) {
|
|
132
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
133
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
137
|
+
constructor: {
|
|
138
|
+
value: subClass,
|
|
139
|
+
writable: true,
|
|
140
|
+
configurable: true
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function _defineProperty(obj, key, value) {
|
|
147
|
+
if (key in obj) {
|
|
148
|
+
Object.defineProperty(obj, key, {
|
|
149
|
+
value: value,
|
|
150
|
+
enumerable: true,
|
|
151
|
+
configurable: true,
|
|
152
|
+
writable: true
|
|
153
|
+
});
|
|
154
|
+
} else {
|
|
155
|
+
obj[key] = value;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return obj;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
var isRequiredIf_1 = createCommonjsModule(function (module, exports) {
|
|
162
|
+
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.
|
|
163
|
+
}};exports.default=isRequiredIf;
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
var isRequiredIf = unwrapExports(isRequiredIf_1);
|
|
169
|
+
|
|
170
|
+
var exenv = createCommonjsModule(function (module) {
|
|
171
|
+
/*!
|
|
172
|
+
Copyright (c) 2015 Jed Watson.
|
|
173
|
+
Based on code that is Copyright 2013-2015, Facebook, Inc.
|
|
174
|
+
All rights reserved.
|
|
175
|
+
*/
|
|
176
|
+
/* global define */
|
|
177
|
+
|
|
178
|
+
(function () {
|
|
179
|
+
|
|
180
|
+
var canUseDOM = !!(
|
|
181
|
+
typeof window !== 'undefined' &&
|
|
182
|
+
window.document &&
|
|
183
|
+
window.document.createElement
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
var ExecutionEnvironment = {
|
|
187
|
+
|
|
188
|
+
canUseDOM: canUseDOM,
|
|
189
|
+
|
|
190
|
+
canUseWorkers: typeof Worker !== 'undefined',
|
|
191
|
+
|
|
192
|
+
canUseEventListeners:
|
|
193
|
+
canUseDOM && !!(window.addEventListener || window.attachEvent),
|
|
194
|
+
|
|
195
|
+
canUseViewport: canUseDOM && !!window.screen
|
|
196
|
+
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
if ( module.exports) {
|
|
200
|
+
module.exports = ExecutionEnvironment;
|
|
201
|
+
} else {
|
|
202
|
+
window.ExecutionEnvironment = ExecutionEnvironment;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
}());
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
var twitterWidgetJs = 'https://platform.twitter.com/widgets.js';
|
|
209
|
+
|
|
210
|
+
var TwitterTimelineEmbed =
|
|
211
|
+
/*#__PURE__*/
|
|
212
|
+
function (_Component) {
|
|
213
|
+
_inherits(TwitterTimelineEmbed, _Component);
|
|
214
|
+
|
|
215
|
+
function TwitterTimelineEmbed(props) {
|
|
216
|
+
var _this;
|
|
217
|
+
|
|
218
|
+
_classCallCheck(this, TwitterTimelineEmbed);
|
|
219
|
+
|
|
220
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterTimelineEmbed).call(this, props));
|
|
221
|
+
_this.state = {
|
|
222
|
+
isLoading: true
|
|
223
|
+
};
|
|
224
|
+
return _this;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
_createClass(TwitterTimelineEmbed, [{
|
|
228
|
+
key: "buildChromeOptions",
|
|
229
|
+
value: function buildChromeOptions(options) {
|
|
230
|
+
options.chrome = '';
|
|
231
|
+
|
|
232
|
+
if (this.props.noHeader) {
|
|
233
|
+
options.chrome = options.chrome + ' noheader';
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (this.props.noFooter) {
|
|
237
|
+
options.chrome = options.chrome + ' nofooter';
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
if (this.props.noBorders) {
|
|
241
|
+
options.chrome = options.chrome + ' noborders';
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
if (this.props.noScrollbar) {
|
|
245
|
+
options.chrome = options.chrome + ' noscrollbar';
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
if (this.props.transparent) {
|
|
249
|
+
options.chrome = options.chrome + ' transparent';
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
return options;
|
|
253
|
+
}
|
|
254
|
+
}, {
|
|
255
|
+
key: "buildOptions",
|
|
256
|
+
value: function buildOptions() {
|
|
257
|
+
var options = Object.assign({}, this.props.options);
|
|
258
|
+
|
|
259
|
+
if (this.props.autoHeight) {
|
|
260
|
+
options.height = this.refs.embedContainer.parentNode.offsetHeight;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
options = Object.assign({}, options, {
|
|
264
|
+
theme: this.props.theme,
|
|
265
|
+
linkColor: this.props.linkColor,
|
|
266
|
+
borderColor: this.props.borderColor,
|
|
267
|
+
lang: this.props.lang
|
|
268
|
+
});
|
|
269
|
+
return options;
|
|
270
|
+
}
|
|
271
|
+
}, {
|
|
272
|
+
key: "renderWidget",
|
|
273
|
+
value: function renderWidget(options) {
|
|
274
|
+
var _this2 = this;
|
|
275
|
+
|
|
276
|
+
var onLoad = this.props.onLoad;
|
|
277
|
+
|
|
278
|
+
if (!this.isMountCanceled) {
|
|
279
|
+
window.twttr.widgets.createTimeline({
|
|
280
|
+
sourceType: this.props.sourceType,
|
|
281
|
+
screenName: this.props.screenName,
|
|
282
|
+
userId: this.props.userId,
|
|
283
|
+
ownerScreenName: this.props.ownerScreenName,
|
|
284
|
+
slug: this.props.slug,
|
|
285
|
+
id: this.props.id || this.props.widgetId,
|
|
286
|
+
url: this.props.url
|
|
287
|
+
}, this.refs.embedContainer, options).then(function (element) {
|
|
288
|
+
_this2.setState({
|
|
289
|
+
isLoading: false
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
if (onLoad) {
|
|
293
|
+
onLoad(element);
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}, {
|
|
299
|
+
key: "componentDidMount",
|
|
300
|
+
value: function componentDidMount() {
|
|
301
|
+
var _this3 = this;
|
|
302
|
+
|
|
303
|
+
if (exenv.canUseDOM) {
|
|
304
|
+
var script = require('scriptjs');
|
|
305
|
+
|
|
306
|
+
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
307
|
+
if (!window.twttr) {
|
|
308
|
+
console.error('Failure to load window.twttr in TwitterTimelineEmbed, aborting load.');
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
var options = _this3.buildOptions();
|
|
313
|
+
/** Append chrome options */
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
options = _this3.buildChromeOptions(options);
|
|
317
|
+
|
|
318
|
+
_this3.renderWidget(options);
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}, {
|
|
323
|
+
key: "componentWillUnmount",
|
|
324
|
+
value: function componentWillUnmount() {
|
|
325
|
+
this.isMountCanceled = true;
|
|
326
|
+
}
|
|
327
|
+
}, {
|
|
328
|
+
key: "render",
|
|
329
|
+
value: function render() {
|
|
330
|
+
var isLoading = this.state.isLoading;
|
|
331
|
+
var placeholder = this.props.placeholder;
|
|
332
|
+
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
333
|
+
ref: "embedContainer"
|
|
334
|
+
}));
|
|
335
|
+
}
|
|
336
|
+
}]);
|
|
337
|
+
|
|
338
|
+
return TwitterTimelineEmbed;
|
|
339
|
+
}(Component);
|
|
340
|
+
|
|
341
|
+
_defineProperty(TwitterTimelineEmbed, "propTypes", {
|
|
342
|
+
/**
|
|
343
|
+
* This can be either of profile, likes, list, collection, URL, widget
|
|
344
|
+
*/
|
|
345
|
+
sourceType: PropTypes.oneOf(['profile', 'likes', 'list', 'collection', 'url', 'widget']).isRequired,
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* username of twitter handle as String
|
|
349
|
+
*/
|
|
350
|
+
screenName: isRequiredIf(PropTypes.string, function (props) {
|
|
351
|
+
return !props.hasOwnProperty('userId') && (props.sourceType === 'profile' || props.sourceType === 'likes');
|
|
352
|
+
}),
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* UserId of twitter handle as number
|
|
356
|
+
*/
|
|
357
|
+
userId: isRequiredIf(PropTypes.number, function (props) {
|
|
358
|
+
return !props.hasOwnProperty('screenName') && (props.sourceType === 'profile' || props.sourceType === 'likes');
|
|
359
|
+
}),
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* To show list, used along with slug
|
|
363
|
+
*/
|
|
364
|
+
ownerScreenName: isRequiredIf(PropTypes.string, function (props) {
|
|
365
|
+
return props.sourceType === 'list' && !props.hasOwnProperty('id');
|
|
366
|
+
}),
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* To show list, used along with ownerScreenName
|
|
370
|
+
*/
|
|
371
|
+
slug: isRequiredIf(PropTypes.string, function (props) {
|
|
372
|
+
return props.sourceType === 'list' && !props.hasOwnProperty('id');
|
|
373
|
+
}),
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* To show list, unique list id
|
|
377
|
+
* Also used with collections, in that case its valid collection id
|
|
378
|
+
*/
|
|
379
|
+
id: isRequiredIf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]), function (props) {
|
|
380
|
+
return props.sourceType === 'list' && !props.hasOwnProperty('ownerScreenName') && !props.hasOwnProperty('slug') || props.sourceType === 'collection';
|
|
381
|
+
}),
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* To show twitter content with url.
|
|
385
|
+
* Supported content includes profiles, likes, lists, and collections.
|
|
386
|
+
*/
|
|
387
|
+
url: isRequiredIf(PropTypes.string, function (props) {
|
|
388
|
+
return props.sourceType === 'url';
|
|
389
|
+
}),
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* To show custom widget
|
|
393
|
+
*/
|
|
394
|
+
widgetId: isRequiredIf(PropTypes.string, function (props) {
|
|
395
|
+
return props.sourceType === 'widget';
|
|
396
|
+
}),
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Additional options to pass to twitter widget plugin
|
|
400
|
+
*/
|
|
401
|
+
options: PropTypes.object,
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Automatically fit into parent container height
|
|
405
|
+
*/
|
|
406
|
+
autoHeight: PropTypes.bool,
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* With dark or light theme
|
|
410
|
+
*/
|
|
411
|
+
theme: PropTypes.oneOf(['dark', 'light']),
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* With custom link colors. Note: Only Hex colors are supported.
|
|
415
|
+
*/
|
|
416
|
+
linkColor: PropTypes.string,
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* With custom border colors. Note: Only Hex colors are supported.
|
|
420
|
+
*/
|
|
421
|
+
borderColor: PropTypes.string,
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Hide the header from timeline
|
|
425
|
+
*/
|
|
426
|
+
noHeader: PropTypes.bool,
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Hide the footer from timeline
|
|
430
|
+
*/
|
|
431
|
+
noFooter: PropTypes.bool,
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Hide the border from timeline
|
|
435
|
+
*/
|
|
436
|
+
noBorders: PropTypes.bool,
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Hide the scrollbars
|
|
440
|
+
*/
|
|
441
|
+
noScrollbar: PropTypes.bool,
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Enable Transparancy
|
|
445
|
+
*/
|
|
446
|
+
transparent: PropTypes.bool,
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Custom language code. Supported codes here: https://developer.twitter.com/en/docs/twitter-for-websites/twitter-for-websites-supported-languages/overview.html
|
|
450
|
+
*/
|
|
451
|
+
lang: PropTypes.string,
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Placeholder while tweet is loading
|
|
455
|
+
*/
|
|
456
|
+
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Function to execute after load, return html element
|
|
460
|
+
*/
|
|
461
|
+
onLoad: PropTypes.func
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
var TwitterShareButton =
|
|
465
|
+
/*#__PURE__*/
|
|
466
|
+
function (_Component) {
|
|
467
|
+
_inherits(TwitterShareButton, _Component);
|
|
468
|
+
|
|
469
|
+
function TwitterShareButton(props) {
|
|
470
|
+
var _this;
|
|
471
|
+
|
|
472
|
+
_classCallCheck(this, TwitterShareButton);
|
|
473
|
+
|
|
474
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterShareButton).call(this, props));
|
|
475
|
+
_this.state = {
|
|
476
|
+
isLoading: true
|
|
477
|
+
};
|
|
478
|
+
return _this;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
_createClass(TwitterShareButton, [{
|
|
482
|
+
key: "componentDidMount",
|
|
483
|
+
value: function componentDidMount() {
|
|
484
|
+
var _this2 = this;
|
|
485
|
+
|
|
486
|
+
var onLoad = this.props.onLoad;
|
|
487
|
+
|
|
488
|
+
if (exenv.canUseDOM) {
|
|
489
|
+
var script = require('scriptjs');
|
|
490
|
+
|
|
491
|
+
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
492
|
+
if (!window.twttr) {
|
|
493
|
+
console.error('Failure to load window.twttr in TwitterShareButton, aborting load.');
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
if (!_this2.isMountCanceled) {
|
|
498
|
+
window.twttr.widgets.createShareButton(_this2.props.url, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
499
|
+
_this2.setState({
|
|
500
|
+
isLoading: false
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
if (onLoad) {
|
|
504
|
+
onLoad(element);
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}, {
|
|
512
|
+
key: "componentWillUnmount",
|
|
513
|
+
value: function componentWillUnmount() {
|
|
514
|
+
this.isMountCanceled = true;
|
|
515
|
+
}
|
|
516
|
+
}, {
|
|
517
|
+
key: "render",
|
|
518
|
+
value: function render() {
|
|
519
|
+
var isLoading = this.state.isLoading;
|
|
520
|
+
var placeholder = this.props.placeholder;
|
|
521
|
+
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
522
|
+
ref: "embedContainer"
|
|
523
|
+
}));
|
|
524
|
+
}
|
|
525
|
+
}]);
|
|
526
|
+
|
|
527
|
+
return TwitterShareButton;
|
|
528
|
+
}(Component);
|
|
529
|
+
|
|
530
|
+
_defineProperty(TwitterShareButton, "propTypes", {
|
|
531
|
+
/**
|
|
532
|
+
* Url for sharing
|
|
533
|
+
*/
|
|
534
|
+
url: PropTypes.string.isRequired,
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Additional options for overriding config. Details at : https://dev.twitter.com/web/tweet-button/parameters
|
|
538
|
+
*/
|
|
539
|
+
options: PropTypes.object,
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Placeholder while tweet is loading
|
|
543
|
+
*/
|
|
544
|
+
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Function to execute after load, return html element
|
|
548
|
+
*/
|
|
549
|
+
onLoad: PropTypes.func
|
|
550
|
+
});
|
|
551
|
+
|
|
552
|
+
var TwitterFollowButton =
|
|
553
|
+
/*#__PURE__*/
|
|
554
|
+
function (_Component) {
|
|
555
|
+
_inherits(TwitterFollowButton, _Component);
|
|
556
|
+
|
|
557
|
+
function TwitterFollowButton(props) {
|
|
558
|
+
var _this;
|
|
559
|
+
|
|
560
|
+
_classCallCheck(this, TwitterFollowButton);
|
|
561
|
+
|
|
562
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterFollowButton).call(this, props));
|
|
563
|
+
_this.state = {
|
|
564
|
+
isLoading: true
|
|
565
|
+
};
|
|
566
|
+
return _this;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
_createClass(TwitterFollowButton, [{
|
|
570
|
+
key: "componentDidMount",
|
|
571
|
+
value: function componentDidMount() {
|
|
572
|
+
var _this2 = this;
|
|
573
|
+
|
|
574
|
+
var onLoad = this.props.onLoad;
|
|
575
|
+
|
|
576
|
+
if (exenv.canUseDOM) {
|
|
577
|
+
var script = require('scriptjs');
|
|
578
|
+
|
|
579
|
+
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
580
|
+
if (!window.twttr) {
|
|
581
|
+
console.error('Failure to load window.twttr in TwitterFollowButton, aborting load.');
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
if (!_this2.isMountCanceled) {
|
|
586
|
+
window.twttr.widgets.createFollowButton(_this2.props.screenName, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
587
|
+
_this2.setState({
|
|
588
|
+
isLoading: false
|
|
589
|
+
});
|
|
590
|
+
|
|
591
|
+
if (onLoad) {
|
|
592
|
+
onLoad(element);
|
|
593
|
+
}
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}, {
|
|
600
|
+
key: "componentWillUnmount",
|
|
601
|
+
value: function componentWillUnmount() {
|
|
602
|
+
this.isMountCanceled = true;
|
|
603
|
+
}
|
|
604
|
+
}, {
|
|
605
|
+
key: "render",
|
|
606
|
+
value: function render() {
|
|
607
|
+
var isLoading = this.state.isLoading;
|
|
608
|
+
var placeholder = this.props.placeholder;
|
|
609
|
+
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
610
|
+
ref: "embedContainer"
|
|
611
|
+
}));
|
|
612
|
+
}
|
|
613
|
+
}]);
|
|
614
|
+
|
|
615
|
+
return TwitterFollowButton;
|
|
616
|
+
}(Component);
|
|
617
|
+
|
|
618
|
+
_defineProperty(TwitterFollowButton, "propTypes", {
|
|
619
|
+
/**
|
|
620
|
+
* Username of twitter user which will be followed on click
|
|
621
|
+
*/
|
|
622
|
+
screenName: PropTypes.string.isRequired,
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Additional options to be added to the button
|
|
626
|
+
*/
|
|
627
|
+
options: PropTypes.object,
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Placeholder while tweet is loading
|
|
631
|
+
*/
|
|
632
|
+
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Function to execute after load, return html element
|
|
636
|
+
*/
|
|
637
|
+
onLoad: PropTypes.func
|
|
638
|
+
});
|
|
639
|
+
|
|
640
|
+
var TwitterHashtagButton =
|
|
641
|
+
/*#__PURE__*/
|
|
642
|
+
function (_Component) {
|
|
643
|
+
_inherits(TwitterHashtagButton, _Component);
|
|
644
|
+
|
|
645
|
+
function TwitterHashtagButton(props) {
|
|
646
|
+
var _this;
|
|
647
|
+
|
|
648
|
+
_classCallCheck(this, TwitterHashtagButton);
|
|
649
|
+
|
|
650
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterHashtagButton).call(this, props));
|
|
651
|
+
_this.state = {
|
|
652
|
+
isLoading: true
|
|
653
|
+
};
|
|
654
|
+
return _this;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
_createClass(TwitterHashtagButton, [{
|
|
658
|
+
key: "componentDidMount",
|
|
659
|
+
value: function componentDidMount() {
|
|
660
|
+
var _this2 = this;
|
|
661
|
+
|
|
662
|
+
var onLoad = this.props.onLoad;
|
|
663
|
+
|
|
664
|
+
if (exenv.canUseDOM) {
|
|
665
|
+
var script = require('scriptjs');
|
|
666
|
+
|
|
667
|
+
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
668
|
+
if (!window.twttr) {
|
|
669
|
+
console.error('Failure to load window.twttr in TwitterHashtagButton, aborting load.');
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
if (!_this2.isMountCanceled) {
|
|
674
|
+
window.twttr.widgets.createHashtagButton(_this2.props.tag, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
675
|
+
_this2.setState({
|
|
676
|
+
isLoading: false
|
|
677
|
+
});
|
|
678
|
+
|
|
679
|
+
if (onLoad) {
|
|
680
|
+
onLoad(element);
|
|
681
|
+
}
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}, {
|
|
688
|
+
key: "componentWillUnmount",
|
|
689
|
+
value: function componentWillUnmount() {
|
|
690
|
+
this.isMountCanceled = true;
|
|
691
|
+
}
|
|
692
|
+
}, {
|
|
693
|
+
key: "render",
|
|
694
|
+
value: function render() {
|
|
695
|
+
var isLoading = this.state.isLoading;
|
|
696
|
+
var placeholder = this.props.placeholder;
|
|
697
|
+
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
698
|
+
ref: "embedContainer"
|
|
699
|
+
}));
|
|
700
|
+
}
|
|
701
|
+
}]);
|
|
702
|
+
|
|
703
|
+
return TwitterHashtagButton;
|
|
704
|
+
}(Component);
|
|
705
|
+
|
|
706
|
+
_defineProperty(TwitterHashtagButton, "propTypes", {
|
|
707
|
+
/**
|
|
708
|
+
* Tag name for hashtag button
|
|
709
|
+
*/
|
|
710
|
+
tag: PropTypes.string.isRequired,
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Additional options to be added to the button
|
|
714
|
+
*/
|
|
715
|
+
options: PropTypes.object,
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Placeholder while tweet is loading
|
|
719
|
+
*/
|
|
720
|
+
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Function to execute after load, return html element
|
|
724
|
+
*/
|
|
725
|
+
onLoad: PropTypes.func
|
|
726
|
+
});
|
|
727
|
+
|
|
728
|
+
var TwitterMentionButton =
|
|
729
|
+
/*#__PURE__*/
|
|
730
|
+
function (_Component) {
|
|
731
|
+
_inherits(TwitterMentionButton, _Component);
|
|
732
|
+
|
|
733
|
+
function TwitterMentionButton(props) {
|
|
734
|
+
var _this;
|
|
735
|
+
|
|
736
|
+
_classCallCheck(this, TwitterMentionButton);
|
|
737
|
+
|
|
738
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterMentionButton).call(this, props));
|
|
739
|
+
_this.state = {
|
|
740
|
+
isLoading: true
|
|
741
|
+
};
|
|
742
|
+
return _this;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
_createClass(TwitterMentionButton, [{
|
|
746
|
+
key: "componentDidMount",
|
|
747
|
+
value: function componentDidMount() {
|
|
748
|
+
var _this2 = this;
|
|
749
|
+
|
|
750
|
+
var onLoad = this.props.onLoad;
|
|
751
|
+
|
|
752
|
+
if (exenv.canUseDOM) {
|
|
753
|
+
var script = require('scriptjs');
|
|
754
|
+
|
|
755
|
+
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
756
|
+
if (!window.twttr) {
|
|
757
|
+
console.error('Failure to load window.twttr in TwitterMentionButton, aborting load.');
|
|
758
|
+
return;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
if (!_this2.isMountCanceled) {
|
|
762
|
+
window.twttr.widgets.createMentionButton(_this2.props.screenName, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
763
|
+
_this2.setState({
|
|
764
|
+
isLoading: false
|
|
765
|
+
});
|
|
766
|
+
|
|
767
|
+
if (onLoad) {
|
|
768
|
+
onLoad(element);
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
}, {
|
|
776
|
+
key: "componentWillUnmount",
|
|
777
|
+
value: function componentWillUnmount() {
|
|
778
|
+
this.isMountCanceled = true;
|
|
779
|
+
}
|
|
780
|
+
}, {
|
|
781
|
+
key: "render",
|
|
782
|
+
value: function render() {
|
|
783
|
+
var isLoading = this.state.isLoading;
|
|
784
|
+
var placeholder = this.props.placeholder;
|
|
785
|
+
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
786
|
+
ref: "embedContainer"
|
|
787
|
+
}));
|
|
788
|
+
}
|
|
789
|
+
}]);
|
|
790
|
+
|
|
791
|
+
return TwitterMentionButton;
|
|
792
|
+
}(Component);
|
|
793
|
+
|
|
794
|
+
_defineProperty(TwitterMentionButton, "propTypes", {
|
|
795
|
+
/**
|
|
796
|
+
* Username to which you will need to tweet
|
|
797
|
+
*/
|
|
798
|
+
screenName: PropTypes.string.isRequired,
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Additional options for overriding config.
|
|
802
|
+
*/
|
|
803
|
+
options: PropTypes.object,
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* Placeholder while tweet is loading
|
|
807
|
+
*/
|
|
808
|
+
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* Function to execute after load, return html element
|
|
812
|
+
*/
|
|
813
|
+
onLoad: PropTypes.func
|
|
814
|
+
});
|
|
815
|
+
|
|
816
|
+
var TwitterTweetEmbed =
|
|
817
|
+
/*#__PURE__*/
|
|
818
|
+
function (_Component) {
|
|
819
|
+
_inherits(TwitterTweetEmbed, _Component);
|
|
820
|
+
|
|
821
|
+
function TwitterTweetEmbed(props) {
|
|
822
|
+
var _this;
|
|
823
|
+
|
|
824
|
+
_classCallCheck(this, TwitterTweetEmbed);
|
|
825
|
+
|
|
826
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterTweetEmbed).call(this, props));
|
|
827
|
+
_this.state = {
|
|
828
|
+
isLoading: true
|
|
829
|
+
};
|
|
830
|
+
return _this;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
_createClass(TwitterTweetEmbed, [{
|
|
834
|
+
key: "renderWidget",
|
|
835
|
+
value: function renderWidget() {
|
|
836
|
+
var _this2 = this;
|
|
837
|
+
|
|
838
|
+
var onLoad = this.props.onLoad;
|
|
839
|
+
|
|
840
|
+
if (!window.twttr) {
|
|
841
|
+
console.error('Failure to load window.twttr in TwitterTweetEmbed, aborting load.');
|
|
842
|
+
return;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
if (!this.isMountCanceled) {
|
|
846
|
+
window.twttr.widgets.createTweet(this.props.tweetId, this.refs.embedContainer, this.props.options).then(function (element) {
|
|
847
|
+
_this2.setState({
|
|
848
|
+
isLoading: false
|
|
849
|
+
});
|
|
850
|
+
|
|
851
|
+
if (onLoad) {
|
|
852
|
+
onLoad(element);
|
|
853
|
+
}
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}, {
|
|
858
|
+
key: "componentDidMount",
|
|
859
|
+
value: function componentDidMount() {
|
|
860
|
+
var _this3 = this;
|
|
861
|
+
|
|
862
|
+
if (exenv.canUseDOM) {
|
|
863
|
+
var script = require('scriptjs');
|
|
864
|
+
|
|
865
|
+
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
866
|
+
_this3.renderWidget();
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}, {
|
|
871
|
+
key: "componentWillUnmount",
|
|
872
|
+
value: function componentWillUnmount() {
|
|
873
|
+
this.isMountCanceled = true;
|
|
874
|
+
}
|
|
875
|
+
}, {
|
|
876
|
+
key: "render",
|
|
877
|
+
value: function render() {
|
|
878
|
+
var isLoading = this.state.isLoading;
|
|
879
|
+
var placeholder = this.props.placeholder;
|
|
880
|
+
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
881
|
+
ref: "embedContainer"
|
|
882
|
+
}));
|
|
883
|
+
}
|
|
884
|
+
}]);
|
|
885
|
+
|
|
886
|
+
return TwitterTweetEmbed;
|
|
887
|
+
}(Component);
|
|
888
|
+
|
|
889
|
+
_defineProperty(TwitterTweetEmbed, "propTypes", {
|
|
890
|
+
/**
|
|
891
|
+
* Tweet id that needs to be shown
|
|
892
|
+
*/
|
|
893
|
+
tweetId: PropTypes.string.isRequired,
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* Additional options to pass to twitter widget plugin
|
|
897
|
+
*/
|
|
898
|
+
options: PropTypes.object,
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Placeholder while tweet is loading
|
|
902
|
+
*/
|
|
903
|
+
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* Function to execute after load, return html element
|
|
907
|
+
*/
|
|
908
|
+
onLoad: PropTypes.func
|
|
909
|
+
});
|
|
910
|
+
|
|
911
|
+
var TwitterMomentShare =
|
|
912
|
+
/*#__PURE__*/
|
|
913
|
+
function (_Component) {
|
|
914
|
+
_inherits(TwitterMomentShare, _Component);
|
|
915
|
+
|
|
916
|
+
function TwitterMomentShare(props) {
|
|
917
|
+
var _this;
|
|
918
|
+
|
|
919
|
+
_classCallCheck(this, TwitterMomentShare);
|
|
920
|
+
|
|
921
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterMomentShare).call(this, props));
|
|
922
|
+
_this.state = {
|
|
923
|
+
isLoading: true
|
|
924
|
+
};
|
|
925
|
+
return _this;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
_createClass(TwitterMomentShare, [{
|
|
929
|
+
key: "componentDidMount",
|
|
930
|
+
value: function componentDidMount() {
|
|
931
|
+
var _this2 = this;
|
|
932
|
+
|
|
933
|
+
var onLoad = this.props.onLoad;
|
|
934
|
+
|
|
935
|
+
if (exenv.canUseDOM) {
|
|
936
|
+
var script = require('scriptjs');
|
|
937
|
+
|
|
938
|
+
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
939
|
+
if (!window.twttr) {
|
|
940
|
+
console.error('Failure to load window.twttr in TwitterMomentShare, aborting load.');
|
|
941
|
+
return;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
if (!_this2.isMountCanceled) {
|
|
945
|
+
window.twttr.widgets.createMoment(_this2.props.momentId, _this2.refs.shareMoment, _this2.props.options).then(function (element) {
|
|
946
|
+
_this2.setState({
|
|
947
|
+
isLoading: false
|
|
948
|
+
});
|
|
949
|
+
|
|
950
|
+
if (onLoad) {
|
|
951
|
+
onLoad(element);
|
|
952
|
+
}
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
}, {
|
|
959
|
+
key: "componentWillUnmount",
|
|
960
|
+
value: function componentWillUnmount() {
|
|
961
|
+
this.isMountCanceled = true;
|
|
962
|
+
}
|
|
963
|
+
}, {
|
|
964
|
+
key: "render",
|
|
965
|
+
value: function render() {
|
|
966
|
+
var isLoading = this.state.isLoading;
|
|
967
|
+
var placeholder = this.props.placeholder;
|
|
968
|
+
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
969
|
+
ref: "shareMoment"
|
|
970
|
+
}));
|
|
971
|
+
}
|
|
972
|
+
}]);
|
|
973
|
+
|
|
974
|
+
return TwitterMomentShare;
|
|
975
|
+
}(Component);
|
|
976
|
+
|
|
977
|
+
_defineProperty(TwitterMomentShare, "propTypes", {
|
|
978
|
+
/**
|
|
979
|
+
* id of Twitter moment to show
|
|
980
|
+
*/
|
|
981
|
+
momentId: PropTypes.string.isRequired,
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* Additional options for overriding config.
|
|
985
|
+
*/
|
|
986
|
+
options: PropTypes.object,
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* Placeholder while tweet is loading
|
|
990
|
+
*/
|
|
991
|
+
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* Function to execute after load, return html element
|
|
995
|
+
*/
|
|
996
|
+
onLoad: PropTypes.func
|
|
997
|
+
});
|
|
998
|
+
|
|
999
|
+
var TwitterDMButton =
|
|
1000
|
+
/*#__PURE__*/
|
|
1001
|
+
function (_Component) {
|
|
1002
|
+
_inherits(TwitterDMButton, _Component);
|
|
1003
|
+
|
|
1004
|
+
function TwitterDMButton(props) {
|
|
1005
|
+
var _this;
|
|
1006
|
+
|
|
1007
|
+
_classCallCheck(this, TwitterDMButton);
|
|
1008
|
+
|
|
1009
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterDMButton).call(this, props));
|
|
1010
|
+
_this.state = {
|
|
1011
|
+
isLoading: true
|
|
1012
|
+
};
|
|
1013
|
+
return _this;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
_createClass(TwitterDMButton, [{
|
|
1017
|
+
key: "componentDidMount",
|
|
1018
|
+
value: function componentDidMount() {
|
|
1019
|
+
var _this2 = this;
|
|
1020
|
+
|
|
1021
|
+
var onLoad = this.props.onLoad;
|
|
1022
|
+
|
|
1023
|
+
if (exenv.canUseDOM) {
|
|
1024
|
+
var script = require('scriptjs');
|
|
1025
|
+
|
|
1026
|
+
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
1027
|
+
if (!window.twttr) {
|
|
1028
|
+
console.error('Failure to load window.twttr in TwitterDMButton, aborting load.');
|
|
1029
|
+
return;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
if (!_this2.isMountCanceled) {
|
|
1033
|
+
window.twttr.widgets.createDMButton(_this2.props.id, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
1034
|
+
_this2.setState({
|
|
1035
|
+
isLoading: false
|
|
1036
|
+
});
|
|
1037
|
+
|
|
1038
|
+
if (onLoad) {
|
|
1039
|
+
onLoad(element);
|
|
1040
|
+
}
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
}, {
|
|
1047
|
+
key: "componentWillUnmount",
|
|
1048
|
+
value: function componentWillUnmount() {
|
|
1049
|
+
this.isMountCanceled = true;
|
|
1050
|
+
}
|
|
1051
|
+
}, {
|
|
1052
|
+
key: "render",
|
|
1053
|
+
value: function render() {
|
|
1054
|
+
var isLoading = this.state.isLoading;
|
|
1055
|
+
var placeholder = this.props.placeholder;
|
|
1056
|
+
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
1057
|
+
ref: "embedContainer"
|
|
1058
|
+
}));
|
|
1059
|
+
}
|
|
1060
|
+
}]);
|
|
1061
|
+
|
|
1062
|
+
return TwitterDMButton;
|
|
1063
|
+
}(Component);
|
|
1064
|
+
|
|
1065
|
+
_defineProperty(TwitterDMButton, "propTypes", {
|
|
1066
|
+
/**
|
|
1067
|
+
* Twitter user id for DM button
|
|
1068
|
+
*/
|
|
1069
|
+
id: PropTypes.number.isRequired,
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* Additional options to be added to the button
|
|
1073
|
+
*/
|
|
1074
|
+
options: PropTypes.object,
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* Placeholder while tweet is loading
|
|
1078
|
+
*/
|
|
1079
|
+
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* Function to execute after load, return html element
|
|
1083
|
+
*/
|
|
1084
|
+
onLoad: PropTypes.func
|
|
1085
|
+
});
|
|
1086
|
+
|
|
1087
|
+
var TwitterVideoEmbed =
|
|
1088
|
+
/*#__PURE__*/
|
|
1089
|
+
function (_Component) {
|
|
1090
|
+
_inherits(TwitterVideoEmbed, _Component);
|
|
1091
|
+
|
|
1092
|
+
function TwitterVideoEmbed(props) {
|
|
1093
|
+
var _this;
|
|
1094
|
+
|
|
1095
|
+
_classCallCheck(this, TwitterVideoEmbed);
|
|
1096
|
+
|
|
1097
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterVideoEmbed).call(this, props));
|
|
1098
|
+
_this.state = {
|
|
1099
|
+
isLoading: true
|
|
1100
|
+
};
|
|
1101
|
+
return _this;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
_createClass(TwitterVideoEmbed, [{
|
|
1105
|
+
key: "componentDidMount",
|
|
1106
|
+
value: function componentDidMount() {
|
|
1107
|
+
var _this2 = this;
|
|
1108
|
+
|
|
1109
|
+
var onLoad = this.props.onLoad;
|
|
1110
|
+
|
|
1111
|
+
if (exenv.canUseDOM) {
|
|
1112
|
+
var script = require('scriptjs');
|
|
1113
|
+
|
|
1114
|
+
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
1115
|
+
if (!window.twttr) {
|
|
1116
|
+
console.error('Failure to load window.twttr in TwitterVideoEmbed, aborting load.');
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
if (!_this2.isMountCanceled) {
|
|
1121
|
+
window.twttr.widgets.createVideo(_this2.props.id, _this2.refs.embedContainer).then(function (element) {
|
|
1122
|
+
_this2.setState({
|
|
1123
|
+
isLoading: false
|
|
1124
|
+
});
|
|
1125
|
+
|
|
1126
|
+
if (onLoad) {
|
|
1127
|
+
onLoad(element);
|
|
1128
|
+
}
|
|
1129
|
+
});
|
|
1130
|
+
}
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
}, {
|
|
1135
|
+
key: "componentWillUnmount",
|
|
1136
|
+
value: function componentWillUnmount() {
|
|
1137
|
+
this.isMountCanceled = true;
|
|
1138
|
+
}
|
|
1139
|
+
}, {
|
|
1140
|
+
key: "render",
|
|
1141
|
+
value: function render() {
|
|
1142
|
+
var isLoading = this.state.isLoading;
|
|
1143
|
+
var placeholder = this.props.placeholder;
|
|
1144
|
+
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
1145
|
+
ref: "embedContainer"
|
|
1146
|
+
}));
|
|
1147
|
+
}
|
|
1148
|
+
}]);
|
|
1149
|
+
|
|
1150
|
+
return TwitterVideoEmbed;
|
|
1151
|
+
}(Component);
|
|
1152
|
+
|
|
1153
|
+
_defineProperty(TwitterVideoEmbed, "propTypes", {
|
|
1154
|
+
/**
|
|
1155
|
+
* Id of video tweet.
|
|
1156
|
+
*/
|
|
1157
|
+
id: PropTypes.string.isRequired,
|
|
1158
|
+
|
|
1159
|
+
/**
|
|
1160
|
+
* Placeholder while tweet is loading
|
|
1161
|
+
*/
|
|
1162
|
+
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* Function to execute after load, return html element
|
|
1166
|
+
*/
|
|
1167
|
+
onLoad: PropTypes.func
|
|
1168
|
+
});
|
|
1169
|
+
|
|
1170
|
+
var TwitterOnAirButton =
|
|
1171
|
+
/*#__PURE__*/
|
|
1172
|
+
function (_Component) {
|
|
1173
|
+
_inherits(TwitterOnAirButton, _Component);
|
|
1174
|
+
|
|
1175
|
+
function TwitterOnAirButton(props) {
|
|
1176
|
+
var _this;
|
|
1177
|
+
|
|
1178
|
+
_classCallCheck(this, TwitterOnAirButton);
|
|
1179
|
+
|
|
1180
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterOnAirButton).call(this, props));
|
|
1181
|
+
_this.state = {
|
|
1182
|
+
isLoading: true
|
|
1183
|
+
};
|
|
1184
|
+
return _this;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
_createClass(TwitterOnAirButton, [{
|
|
1188
|
+
key: "componentDidMount",
|
|
1189
|
+
value: function componentDidMount() {
|
|
1190
|
+
var _this2 = this;
|
|
1191
|
+
|
|
1192
|
+
var onLoad = this.props.onLoad;
|
|
1193
|
+
|
|
1194
|
+
if (exenv.canUseDOM) {
|
|
1195
|
+
var script = require('scriptjs');
|
|
1196
|
+
|
|
1197
|
+
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
1198
|
+
if (!window.twttr) {
|
|
1199
|
+
console.error('Failure to load window.twttr in TwitterOnAirButton, aborting load.');
|
|
1200
|
+
return;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
if (!_this2.isMountCanceled) {
|
|
1204
|
+
window.twttr.widgets.createPeriscopeOnAirButton(_this2.props.username, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
1205
|
+
_this2.setState({
|
|
1206
|
+
isLoading: false
|
|
1207
|
+
});
|
|
1208
|
+
|
|
1209
|
+
if (onLoad) {
|
|
1210
|
+
onLoad(element);
|
|
1211
|
+
}
|
|
1212
|
+
});
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
}, {
|
|
1218
|
+
key: "componentWillUnmount",
|
|
1219
|
+
value: function componentWillUnmount() {
|
|
1220
|
+
this.isMountCanceled = true;
|
|
1221
|
+
}
|
|
1222
|
+
}, {
|
|
1223
|
+
key: "render",
|
|
1224
|
+
value: function render() {
|
|
1225
|
+
var isLoading = this.state.isLoading;
|
|
1226
|
+
var placeholder = this.props.placeholder;
|
|
1227
|
+
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
1228
|
+
ref: "embedContainer"
|
|
1229
|
+
}));
|
|
1230
|
+
}
|
|
1231
|
+
}]);
|
|
1232
|
+
|
|
1233
|
+
return TwitterOnAirButton;
|
|
1234
|
+
}(Component);
|
|
1235
|
+
|
|
1236
|
+
_defineProperty(TwitterOnAirButton, "propTypes", {
|
|
1237
|
+
/**
|
|
1238
|
+
* Username for which you require periscope on air button
|
|
1239
|
+
*/
|
|
1240
|
+
username: PropTypes.string.isRequired,
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
* Additional options for overriding config.
|
|
1244
|
+
*/
|
|
1245
|
+
options: PropTypes.object,
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* Placeholder while tweet is loading
|
|
1249
|
+
*/
|
|
1250
|
+
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* Function to execute after load, return html element
|
|
1254
|
+
*/
|
|
1255
|
+
onLoad: PropTypes.func
|
|
1256
|
+
});
|
|
61
1257
|
|
|
62
1258
|
var ImageSlider = function ImageSlider(props) {
|
|
63
1259
|
var innerSlider = useRef(null);
|
|
@@ -163,61 +1359,61 @@ var ImageSlider = function ImageSlider(props) {
|
|
|
163
1359
|
}, []);
|
|
164
1360
|
|
|
165
1361
|
var variant = 'black';
|
|
166
|
-
return
|
|
167
|
-
|
|
1362
|
+
return React.createElement(
|
|
1363
|
+
React.Fragment,
|
|
168
1364
|
null,
|
|
169
|
-
|
|
1365
|
+
React.createElement(
|
|
170
1366
|
'div',
|
|
171
1367
|
{ ref: viewableWindow, id: 'vid-slider', className: 'col' },
|
|
172
|
-
|
|
1368
|
+
React.createElement(
|
|
173
1369
|
'div',
|
|
174
1370
|
{ className: 'row' },
|
|
175
|
-
showScroller &&
|
|
1371
|
+
showScroller && React.createElement(
|
|
176
1372
|
'div',
|
|
177
1373
|
{ onClick: function onClick(e) {
|
|
178
1374
|
return scrollSlider(e, 'prev');
|
|
179
1375
|
}, className: 'tile__slider-prev', style: { color: variant } },
|
|
180
|
-
|
|
1376
|
+
React.createElement('i', { style: { border: 'solid ' + variant, borderWidth: '0 4px 4px 0' }, className: 'arrow left' })
|
|
181
1377
|
),
|
|
182
|
-
showScroller &&
|
|
1378
|
+
showScroller && React.createElement(
|
|
183
1379
|
'div',
|
|
184
1380
|
{ onClick: function onClick(e) {
|
|
185
1381
|
return scrollSlider(e, 'next');
|
|
186
1382
|
}, className: 'tile__slider-next', style: { color: variant } },
|
|
187
|
-
|
|
1383
|
+
React.createElement('i', { style: { border: 'solid ' + variant, borderWidth: '0 4px 4px 0' }, className: 'arrow right' })
|
|
188
1384
|
),
|
|
189
|
-
|
|
1385
|
+
React.createElement(
|
|
190
1386
|
'div',
|
|
191
1387
|
{ ref: innerSlider, className: 'row__inner' },
|
|
192
1388
|
props.data.slides.map(function (img, index) {
|
|
193
1389
|
var thumbnail = urlFor(img.slideshowImage).width(250);
|
|
194
1390
|
if (!img.slideshowImage.link) {
|
|
195
|
-
return
|
|
1391
|
+
return React.createElement(
|
|
196
1392
|
'div',
|
|
197
1393
|
{ ref: tile, key: index, className: 'tile', style: { width: tileSize + 'px' } },
|
|
198
|
-
|
|
1394
|
+
React.createElement(
|
|
199
1395
|
'div',
|
|
200
1396
|
{ className: 'tile__media' },
|
|
201
|
-
|
|
1397
|
+
React.createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '', style: { width: tileSize + 'px' } })
|
|
202
1398
|
),
|
|
203
|
-
|
|
1399
|
+
React.createElement('div', { style: { color: variant }, className: 'tile__info' })
|
|
204
1400
|
);
|
|
205
1401
|
} else {
|
|
206
|
-
return
|
|
1402
|
+
return React.createElement(
|
|
207
1403
|
'a',
|
|
208
1404
|
{ ref: tile, key: index, href: img.slideshowImage.link, target: img.slideshowImage.blank ? '_target' : '_self', className: 'tile', style: { width: tileSize + 'px' } },
|
|
209
|
-
|
|
1405
|
+
React.createElement(
|
|
210
1406
|
'div',
|
|
211
1407
|
{ className: 'tile__media' },
|
|
212
|
-
|
|
1408
|
+
React.createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '', style: { width: tileSize + 'px' } })
|
|
213
1409
|
),
|
|
214
|
-
|
|
1410
|
+
React.createElement('div', { style: { color: variant }, className: 'tile__info' })
|
|
215
1411
|
);
|
|
216
1412
|
}
|
|
217
1413
|
})
|
|
218
1414
|
)
|
|
219
1415
|
),
|
|
220
|
-
|
|
1416
|
+
React.createElement(
|
|
221
1417
|
'style',
|
|
222
1418
|
{ jsx: 'true' },
|
|
223
1419
|
'\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 '
|
|
@@ -240,95 +1436,95 @@ var PartnerDetails = function PartnerDetails(_ref) {
|
|
|
240
1436
|
pageview = _ref.pageview,
|
|
241
1437
|
page = _ref.page;
|
|
242
1438
|
|
|
243
|
-
return
|
|
244
|
-
|
|
1439
|
+
return React.createElement(
|
|
1440
|
+
React.Fragment,
|
|
245
1441
|
null,
|
|
246
|
-
|
|
247
|
-
|
|
1442
|
+
React.createElement(Breadcrumbs, null),
|
|
1443
|
+
React.createElement(
|
|
248
1444
|
'div',
|
|
249
1445
|
{ className: 'partners-page' },
|
|
250
|
-
|
|
1446
|
+
React.createElement(
|
|
251
1447
|
'div',
|
|
252
1448
|
{ className: 'my-5 partner-logo-wrap', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
|
|
253
|
-
partnerDetails.thumbnail && partnerDetails.thumbnail.link ?
|
|
1449
|
+
partnerDetails.thumbnail && partnerDetails.thumbnail.link ? React.createElement(
|
|
254
1450
|
'a',
|
|
255
1451
|
{ className: 'partners-logo', style: { width: '25%', minWidth: '25%' }, href: partnerDetails.thumbnail.link, target: partnerDetails.thumbnail.blank ? '_blank' : '' },
|
|
256
|
-
|
|
1452
|
+
React.createElement(
|
|
257
1453
|
'figure',
|
|
258
1454
|
{ style: { width: '100%', textAlign: 'center' } },
|
|
259
|
-
|
|
1455
|
+
React.createElement('img', {
|
|
260
1456
|
alt: partnerDetails.thumbnail && partnerDetails.thumbnail.alt ? partnerDetails.thumbnail.alt : partnerDetails.name,
|
|
261
1457
|
style: { maxWidth: '100%' },
|
|
262
1458
|
src: partnerDetails.thumbnail ? urlFor(client, partnerDetails.thumbnail.asset) : '' }),
|
|
263
|
-
partnerDetails.thumbnail && partnerDetails.thumbnail.caption &&
|
|
1459
|
+
partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React.createElement(
|
|
264
1460
|
'figcaption',
|
|
265
1461
|
null,
|
|
266
1462
|
partnerDetails.thumbnail.caption
|
|
267
1463
|
)
|
|
268
1464
|
)
|
|
269
|
-
) :
|
|
1465
|
+
) : React.createElement(
|
|
270
1466
|
'figure',
|
|
271
1467
|
{ className: 'partners-logo', style: { width: '25%', minWidth: '25%', textAlign: 'center' } },
|
|
272
|
-
|
|
1468
|
+
React.createElement('img', {
|
|
273
1469
|
alt: partnerDetails.thumbnail && partnerDetails.thumbnail.alt ? partnerDetails.thumbnail.alt : partnerDetails.name,
|
|
274
1470
|
style: { maxWidth: '100%' },
|
|
275
1471
|
src: partnerDetails.thumbnail ? urlFor(client, partnerDetails.thumbnail.asset) : '' }),
|
|
276
|
-
partnerDetails.thumbnail && partnerDetails.thumbnail.caption &&
|
|
1472
|
+
partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React.createElement(
|
|
277
1473
|
'figcaption',
|
|
278
1474
|
null,
|
|
279
1475
|
partnerDetails.thumbnail.caption
|
|
280
1476
|
)
|
|
281
1477
|
),
|
|
282
|
-
|
|
1478
|
+
React.createElement(
|
|
283
1479
|
'style',
|
|
284
1480
|
{ jsx: 'true' },
|
|
285
1481
|
'\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 '
|
|
286
1482
|
),
|
|
287
|
-
partnerDetails.description &&
|
|
1483
|
+
partnerDetails.description && React.createElement(
|
|
288
1484
|
'div',
|
|
289
1485
|
{ className: 'block-content-partners my-4', style: { maxWidth: '100%', paddingLeft: '2rem', flex: '1 1 auto' } },
|
|
290
|
-
|
|
1486
|
+
React.createElement(BlockContent, _extends({ serializers: getSerializers(client), blocks: partnerDetails.description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
|
|
291
1487
|
)
|
|
292
1488
|
),
|
|
293
|
-
partnerDetails.affiliates && partnerDetails.affiliates[0] && partnerDetails.affiliates[0].slides &&
|
|
1489
|
+
partnerDetails.affiliates && partnerDetails.affiliates[0] && partnerDetails.affiliates[0].slides && React.createElement(
|
|
294
1490
|
'div',
|
|
295
1491
|
{ className: 'mb-4', style: { padding: '0 15px' } },
|
|
296
|
-
partnerDetails.affiliates[0].title &&
|
|
1492
|
+
partnerDetails.affiliates[0].title && React.createElement(
|
|
297
1493
|
'h2',
|
|
298
1494
|
{ className: 'bb-gold' },
|
|
299
1495
|
partnerDetails.affiliates[0].title
|
|
300
1496
|
),
|
|
301
|
-
|
|
1497
|
+
React.createElement(ImageSlider, { client: client, data: partnerDetails.affiliates[0] })
|
|
302
1498
|
),
|
|
303
|
-
features.length > 0 &&
|
|
1499
|
+
features.length > 0 && React.createElement(
|
|
304
1500
|
'div',
|
|
305
1501
|
{ className: ' mb-5' },
|
|
306
|
-
|
|
1502
|
+
React.createElement(Feature, { dataset: features, client: client })
|
|
307
1503
|
),
|
|
308
|
-
partnerDetails.twitter &&
|
|
309
|
-
|
|
1504
|
+
partnerDetails.twitter && React.createElement(
|
|
1505
|
+
React.Fragment,
|
|
310
1506
|
null,
|
|
311
|
-
|
|
1507
|
+
React.createElement(
|
|
312
1508
|
'div',
|
|
313
1509
|
{ className: 'mb-5', style: { width: '100%', textAlign: 'center', padding: '0 15px', border: '2px solid #aaa', borderRadius: '15px' } },
|
|
314
|
-
|
|
1510
|
+
React.createElement(TwitterTimelineEmbed, { sourceType: 'url', url: partnerDetails.twitter, options: { height: 400 } })
|
|
315
1511
|
)
|
|
316
1512
|
),
|
|
317
|
-
|
|
1513
|
+
React.createElement(
|
|
318
1514
|
'div',
|
|
319
1515
|
null,
|
|
320
|
-
posts && posts.length > 0 &&
|
|
321
|
-
|
|
1516
|
+
posts && posts.length > 0 && React.createElement(
|
|
1517
|
+
React.Fragment,
|
|
322
1518
|
null,
|
|
323
|
-
|
|
1519
|
+
React.createElement(
|
|
324
1520
|
'h2',
|
|
325
1521
|
{ className: 'bb-gold mb-2' },
|
|
326
1522
|
'Latest from ',
|
|
327
1523
|
partnerDetails.name
|
|
328
1524
|
),
|
|
329
|
-
|
|
1525
|
+
React.createElement('hr', null)
|
|
330
1526
|
),
|
|
331
|
-
|
|
1527
|
+
React.createElement(QueueDeckExpanded, {
|
|
332
1528
|
client: client,
|
|
333
1529
|
mapping: Settings.mapping,
|
|
334
1530
|
dataRecord: posts,
|