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